directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1546538 - /directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/managed/Leaf.java
Date Fri, 29 Nov 2013 11:06:07 GMT
Author: elecharny
Date: Fri Nov 29 11:06:06 2013
New Revision: 1546538

URL: http://svn.apache.org/r1546538
Log:
Update the value when we try to insert an existing value (because the value might have changed
but the comparator does not see this modification)

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=1546538&r1=1546537&r2=1546538&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 Nov 29 11:06:06 2013
@@ -792,6 +792,14 @@ import org.apache.directory.mavibot.btre
             valueHolder.add( value );
             newLeaf.values[pos] = valueHolder;
         }
+        else
+        {
+            // As strange as it sounds, we need to remove the value to reinject it.
+            // There are cases where the value retrieval just use one part of the
+            // value only (typically for LDAP Entries, where we use the DN)
+            valueHolder.remove( value );
+            valueHolder.add( value );
+        }
 
         // Create the result
         InsertResult<K, V> result = new ModifyResult<K, V>( newLeaf, ( V ) valueHolder
);



Mime
View raw message