directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1418358 - in /directory/apacheds/trunk: service-builder/src/main/java/org/apache/directory/server/config/builder/ test-framework/src/test/java/org/apache/directory/server/core/integ/ xdbm-partition/src/main/java/org/apache/directory/server...
Date Fri, 07 Dec 2012 15:25:08 GMT
Author: elecharny
Date: Fri Dec  7 15:25:06 2012
New Revision: 1418358

URL: http://svn.apache.org/viewvc?rev=1418358&view=rev
Log:
o Closing streams
o Adding toString() methods
o Removing dead code
o Removing useless imports

Modified:
    directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
    directory/apacheds/trunk/test-framework/src/test/java/org/apache/directory/server/core/integ/TestWithClassLevelLdapServer.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java

Modified: directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java?rev=1418358&r1=1418357&r2=1418358&view=diff
==============================================================================
--- directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
(original)
+++ directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
Fri Dec  7 15:25:06 2012
@@ -1244,6 +1244,16 @@ public class ServiceBuilder
                     LdifEntry entry = entries.get( 0 );
                     jdbmPartition.setContextEntry( entry.getEntry() );
                 }
+                
+                try
+                {
+                    ldifReader.close();;
+                }
+                catch (IOException ioe )
+                {
+                    LOG.error( "Cannot close the ldif reader" );
+                }
+                
             }
             catch ( LdapLdifException lle )
             {

Modified: directory/apacheds/trunk/test-framework/src/test/java/org/apache/directory/server/core/integ/TestWithClassLevelLdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/test/java/org/apache/directory/server/core/integ/TestWithClassLevelLdapServer.java?rev=1418358&r1=1418357&r2=1418358&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/test/java/org/apache/directory/server/core/integ/TestWithClassLevelLdapServer.java
(original)
+++ directory/apacheds/trunk/test-framework/src/test/java/org/apache/directory/server/core/integ/TestWithClassLevelLdapServer.java
Fri Dec  7 15:25:06 2012
@@ -19,7 +19,6 @@
 package org.apache.directory.server.core.integ;
 
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java?rev=1418358&r1=1418357&r2=1418358&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
Fri Dec  7 15:25:06 2012
@@ -201,11 +201,45 @@ public class EntryCursorAdaptor extends 
     }
 
 
-    /* 
-     * @see Cursor#previous()
+    /**
+     * {@inheritDoc}
      */
     public boolean previous() throws Exception
     {
         return indexCursor.previous();
     }
+    
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "EntryCursorAdaptor\n" );
+        
+        if ( indexCursor != null )
+        {
+            sb.append( tabs ).append( "    " ).append( "IndexCursor : \n" );
+            sb.append( indexCursor.toString( tabs + "        " ) );
+        }
+        
+        if ( evaluator != null )
+        {
+            sb.append( tabs ).append( "    " ).append( "Evaluator : \n" );
+            sb.append( evaluator.toString( tabs + "        " ) );
+        }
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java?rev=1418358&r1=1418357&r2=1418358&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
Fri Dec  7 15:25:06 2012
@@ -105,11 +105,6 @@ public class LessEqEvaluator<T> extends 
             indexEntry.setEntry( entry );
         }
 
-        if ( null == entry )
-        {
-            return false;
-        }
-
         // get the attribute
         Attribute attr = entry.get( attributeType );
 



Mime
View raw message