directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r811884 - in /directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree: AvlTreeImpl.java AvlTreeMarshaller.java
Date Sun, 06 Sep 2009 20:50:39 GMT
Author: elecharny
Date: Sun Sep  6 20:50:39 2009
New Revision: 811884

URL: http://svn.apache.org/viewvc?rev=811884&view=rev
Log:
Added the missing setSize() method necessary for deserialization

Modified:
    directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeImpl.java
    directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMarshaller.java

Modified: directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeImpl.java?rev=811884&r1=811883&r2=811884&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeImpl.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeImpl.java
Sun Sep  6 20:50:39 2009
@@ -384,6 +384,18 @@
         return size;
     }
     
+    /**
+     * Set the size of the tree.
+     * 
+     * Note : this method is used by the deserialization method
+     *
+     * @param size the size of the tree
+     */
+    /* no protection */ void setSize( int size )
+    {
+        this.size = size;
+    }
+    
     
     /**
      * Set the root of the tree.
@@ -408,6 +420,7 @@
     /* no protection */  void setFirst( LinkedAvlNode<K> first )
     {
         this.first = first;
+        size++;
     }
 
     

Modified: directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMarshaller.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMarshaller.java?rev=811884&r1=811883&r2=811884&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMarshaller.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMarshaller.java
Sun Sep  6 20:50:39 2009
@@ -195,6 +195,9 @@
         
         tree.setFirst( nodes[0] );
         
+        // Update the size
+        tree.setSize( size );
+        
         if( nodes.length >= 1 )
         {
             tree.setLast( nodes[ nodes.length - 1 ] );



Mime
View raw message