directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1546079 - /directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java
Date Wed, 27 Nov 2013 15:53:09 GMT
Author: kayyagari
Date: Wed Nov 27 15:53:08 2013
New Revision: 1546079

URL: http://svn.apache.org/r1546079
Log:
fixed wrong index value

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=1546079&r1=1546078&r2=1546079&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
Wed Nov 27 15:53:08 2013
@@ -984,7 +984,7 @@ import org.apache.directory.mavibot.btre
      */
     public Tuple<K, V> findRightMost() throws EndOfFileExceededException, IOException
     {
-        ValueCursor<V> cursor = values[0].getCursor();
+        ValueCursor<V> cursor = values[nbElems - 1].getCursor();
 
         try
         {
@@ -992,12 +992,12 @@ import org.apache.directory.mavibot.btre
 
             if ( cursor.hasPrev() )
             {
-                return new Tuple<K, V>( keys[0].getKey(), cursor.prev() );
+                return new Tuple<K, V>( keys[nbElems - 1].getKey(), cursor.prev() );
             }
             else
             {
                 // Null value
-                return new Tuple<K, V>( keys[0].getKey(), null );
+                return new Tuple<K, V>( keys[nbElems - 1].getKey(), null );
             }
         }
         finally



Mime
View raw message