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 2012/04/30 01:54:07 UTC

svn commit: r1332030 - /directory/apacheds/branches/index-work/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java

Author: elecharny
Date: Sun Apr 29 23:54:07 2012
New Revision: 1332030

URL: http://svn.apache.org/viewvc?rev=1332030&view=rev
Log:
Fixed some error due to the wrong DN being passed to the lookup(ID, Dn) method

Modified:
    directory/apacheds/branches/index-work/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java

Modified: directory/apacheds/branches/index-work/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=1332030&r1=1332029&r2=1332030&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java (original)
+++ directory/apacheds/branches/index-work/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Sun Apr 29 23:54:07 2012
@@ -302,7 +302,7 @@ public class LdifPartition extends Abstr
         super.move( moveContext );
 
         // Get the modified entry
-        Entry modifiedEntry = lookup( id, oldDn );
+        Entry modifiedEntry = lookup( id, moveContext.getNewDn() );
 
         try
         {
@@ -326,7 +326,7 @@ public class LdifPartition extends Abstr
         super.moveAndRename( moveAndRenameContext );
 
         // Get the modified entry and store it in the context for post usage
-        Entry modifiedEntry = lookup( id, oldDn );
+        Entry modifiedEntry = lookup( id, moveAndRenameContext.getNewDn() );
         moveAndRenameContext.setModifiedEntry( modifiedEntry );
 
         try
@@ -352,7 +352,8 @@ public class LdifPartition extends Abstr
         super.rename( renameContext );
 
         // Get the modified entry and store it in the context for post usage
-        Entry modifiedEntry = lookup( id, oldDn );
+        Dn newDn = oldDn.getParent().add( renameContext.getNewRdn() );
+        Entry modifiedEntry = lookup( id, newDn );
         renameContext.setModifiedEntry( modifiedEntry );
 
         // Now move the potential children for the old entry