directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r952265 - /directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BTree.java
Date Mon, 07 Jun 2010 15:20:48 GMT
Author: elecharny
Date: Mon Jun  7 15:20:46 2010
New Revision: 952265

URL: http://svn.apache.org/viewvc?rev=952265&view=rev
Log:
Reverted a wrong check on the keySerializer.

Modified:
    directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BTree.java

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BTree.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BTree.java?rev=952265&r1=952264&r2=952265&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BTree.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BTree.java Mon Jun  7 15:20:46
2010
@@ -55,13 +55,13 @@ import java.io.Serializable;
 import java.util.Comparator;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.directory.server.i18n.I18n;
-
 import jdbm.RecordManager;
 import jdbm.helper.Serializer;
 import jdbm.helper.Tuple;
 import jdbm.helper.TupleBrowser;
 
+import org.apache.directory.server.i18n.I18n;
+
 
 /**
  * B+Tree persistent indexing data structure.  B+Trees are optimized for
@@ -206,12 +206,12 @@ public class BTree<K, V> implements Exte
             throw new IllegalArgumentException( I18n.err( I18n.ERR_519 ) );
         }
 
-        if ( keySerializer != null )
+        if ( ( keySerializer != null ) && ! ( keySerializer instanceof Serializable
) )
         {
             throw new IllegalArgumentException( I18n.err( I18n.ERR_520 ) );
         }
 
-        if ( valueSerializer != null && !( valueSerializer instanceof Serializable
) )
+        if ( ( valueSerializer != null ) && !( valueSerializer instanceof Serializable
) )
         {
             throw new IllegalArgumentException( I18n.err( I18n.ERR_521 ) );
         }



Mime
View raw message