directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1538011 - /directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
Date Fri, 01 Nov 2013 18:08:01 GMT
Author: elecharny
Date: Fri Nov  1 18:08:00 2013
New Revision: 1538011

URL: http://svn.apache.org/r1538011
Log:
Applied a patch for DIRSERVER-1909

Modified:
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=1538011&r1=1538010&r2=1538011&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
Fri Nov  1 18:08:00 2013
@@ -163,7 +163,16 @@ public class JdbmTable<K, V> extends Abs
             bt = new BTree<K, V>().load( recMan, recId );
             ( ( SerializableComparator<K> ) bt.getComparator() ).setSchemaManager(
schemaManager );
             recId = recMan.getNamedObject( name + SZSUFFIX );
-            count = ( Long ) recMan.fetch( recId );
+            Object value = recMan.fetch( recId );
+
+            if ( value instanceof Integer )
+            {
+                count = ( ( Integer ) value ).longValue();
+            }
+            else
+            {
+                count = ( Long ) value;
+            }
         }
     }
 



Mime
View raw message