Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 03A499A40 for ; Sun, 29 Apr 2012 23:54:29 +0000 (UTC) Received: (qmail 38792 invoked by uid 500); 29 Apr 2012 23:54:28 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 38751 invoked by uid 500); 29 Apr 2012 23:54:28 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 38744 invoked by uid 99); 29 Apr 2012 23:54:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Apr 2012 23:54:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Apr 2012 23:54:27 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BA618238896F for ; Sun, 29 Apr 2012 23:54:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1332030 - /directory/apacheds/branches/index-work/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Date: Sun, 29 Apr 2012 23:54:07 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120429235407.BA618238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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