directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1546829 - /directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java
Date Sun, 01 Dec 2013 18:06:30 GMT
Author: elecharny
Date: Sun Dec  1 18:06:29 2013
New Revision: 1546829

URL: http://svn.apache.org/r1546829
Log:
Fixed a big bug in the delete operation : we were copying the modified page into a new page,
smaller from the original one, but all the values were copied, which led to a ArrayOutOfBoundException.
This exception was silently ignored...

Modified:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java?rev=1546829&r1=1546828&r2=1546829&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java
Sun Dec  1 18:06:29 2013
@@ -757,6 +757,12 @@ import org.apache.directory.mavibot.btre
                 // TODO Auto-generated catch block
                 e.printStackTrace();
             }
+            
+            // Stop when we have copied nbElems values
+            if ( pos == nbElems )
+            {
+                break;
+            }
         }
 
         return newLeaf;



Mime
View raw message