You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2016/06/21 11:49:15 UTC

svn commit: r1749492 - /directory/apacheds/branches/apacheds-value/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java

Author: elecharny
Date: Tue Jun 21 11:49:14 2016
New Revision: 1749492

URL: http://svn.apache.org/viewvc?rev=1749492&view=rev
Log:
Create a normalized form of the EntryDN value, to avoid a costly and useless DN parsing

Modified:
    directory/apacheds/branches/apacheds-value/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java

Modified: directory/apacheds/branches/apacheds-value/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1749492&r1=1749491&r2=1749492&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java (original)
+++ directory/apacheds/branches/apacheds-value/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java Tue Jun 21 11:49:14 2016
@@ -1288,15 +1288,16 @@ public abstract class AbstractBTreeParti
 
                 // Replace the entry's DN with the provided one
                 Attribute entryDnAt = entry.get( entryDnAT );
+                Value dnValue = new Value( entryDnAT, dn.getName(), dn.getNormName() );
 
                 if ( entryDnAt == null )
                 {
-                    entry.add( entryDnAT, dn.getName() );
+                    entry.add( entryDnAT, dnValue );
                 }
                 else
                 {
                     entryDnAt.clear();
-                    entryDnAt.add( dn.getName() );
+                    entryDnAt.add( dnValue );
                 }
 
                 return entry;