You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2013/09/28 09:33:53 UTC
svn commit: r1527162 -
/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Author: kayyagari
Date: Sat Sep 28 07:33:53 2013
New Revision: 1527162
URL: http://svn.apache.org/r1527162
Log:
do not remove the attribute instead add or just replace the value of the existing entryDN attribute (see DIRSERVER-1902)
Modified:
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1527162&r1=1527161&r2=1527162&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java Sat Sep 28 07:33:53 2013
@@ -1141,12 +1141,19 @@ public abstract class AbstractBTreeParti
if ( entry != null )
{
// Replace the entry's DN with the provided one
- if ( entry.containsAttribute( ENTRY_DN_AT ) )
+ Attribute entryDnAt = entry.get( ENTRY_DN_AT );
+
+ // see DIRSERVER-1902
+ if ( entryDnAt == null )
{
- entry.removeAttributes( ENTRY_DN_AT );
+ entry.add( ENTRY_DN_AT, dn.getName() );
}
-
- entry.add( ENTRY_DN_AT, dn.getName() );
+ else
+ {
+ entryDnAt.clear();
+ entryDnAt.add( dn.getName() );
+ }
+
entry.setDn( dn );
return new ClonedServerEntry( entry );