directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1506913 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Date Thu, 25 Jul 2013 11:41:13 GMT
Author: elecharny
Date: Thu Jul 25 11:41:13 2013
New Revision: 1506913

URL: http://svn.apache.org/r1506913
Log:
Always replace the Entry's DN when the search is a OBJECT scope, and the user has provided
a DN

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=1506913&r1=1506912&r2=1506913&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
Thu Jul 25 11:41:13 2013
@@ -1112,11 +1112,15 @@ public abstract class AbstractBTreeParti
 
             if ( entry != null )
             {
-                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
+                // Replace the entry's DN with the provided one
+                if ( entry.containsAttribute( ENTRY_DN_AT ) )
                 {
-                    entry.add( ENTRY_DN_AT, dn.getName() );
+                    entry.removeAttributes( ENTRY_DN_AT );
                 }
 
+                entry.add( ENTRY_DN_AT, dn.getName() );
+                entry.setDn( dn );
+
                 return new ClonedServerEntry( entry );
             }
 



Mime
View raw message