directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1529106 - in /directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed: AbstractPage.java Leaf.java Node.java
Date Fri, 04 Oct 2013 09:15:44 GMT
Author: elecharny
Date: Fri Oct  4 09:15:43 2013
New Revision: 1529106

URL: http://svn.apache.org/r1529106
Log:
o Get rid of some unused code
o Added some missing generics

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

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/AbstractPage.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/AbstractPage.java?rev=1529106&r1=1529105&r2=1529106&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/AbstractPage.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/AbstractPage.java
Fri Oct  4 09:15:43 2013
@@ -76,10 +76,6 @@ import java.nio.ByteBuffer;
         this.btree = btree;
         this.revision = revision;
         this.nbElems = nbElems;
-
-        // We get the type of array to create from the btree
-        // Yes, this is an hack...
-        Class<?> keyType = btree.getKeyType();
         this.keys = ( KeyHolder[] ) Array.newInstance( KeyHolder.class, nbElems );
     }
 

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=1529106&r1=1529105&r2=1529106&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
Fri Oct  4 09:15:43 2013
@@ -536,6 +536,7 @@ import org.apache.directory.mavibot.btre
             if ( btree.isAllowDuplicates() )
             {
                 MultipleMemoryHolder<K, V> mvHolder = ( MultipleMemoryHolder<K,
V> ) values[-( pos + 1 )];
+
                 if ( mvHolder.isSingleValue() )
                 {
                     return mvHolder.getValue( btree );
@@ -544,6 +545,7 @@ import org.apache.directory.mavibot.btre
                 {
                     // always return the first value for get(key) when duplicates are allowed
                     BTree<V, V> dupTree = ( BTree<V, V> ) mvHolder.getValue(
btree );
+
                     return dupTree.rootPage.getLeftMostKey();
                 }
             }
@@ -868,7 +870,7 @@ import org.apache.directory.mavibot.btre
 
         // Atm, store the value in memory
 
-        ElementHolder valueHolder = null;
+        ElementHolder<V, K, V> valueHolder = null;
 
         if ( btree.isAllowDuplicates() )
         {

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java?rev=1529106&r1=1529105&r2=1529106&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Node.java
Fri Oct  4 09:15:43 2013
@@ -122,12 +122,9 @@ import org.apache.directory.mavibot.btre
         children[1] = rightPage;
 
         // Create the keys array and store the pivot into it
-        // We get the type of array to create from the btree
-        // Yes, this is an hack...
-        Class<?> keyType = btree.getKeyType();
         keys = ( KeyHolder[] ) Array.newInstance( KeyHolder.class, btree.getPageSize() );
 
-        keys[0] = new KeyHolder( key, btree.getKeySerializer() );
+        keys[0] = new KeyHolder<K>( key, btree.getKeySerializer() );
     }
 
 



Mime
View raw message