You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2011/11/16 18:25:45 UTC
svn commit: r1202795 -
/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java
Author: pamarcelot
Date: Wed Nov 16 17:25:44 2011
New Revision: 1202795
URL: http://svn.apache.org/viewvc?rev=1202795&view=rev
Log:
Fixed a bug when an enty with all its children was deleted between the two partitions.
Modified:
directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java?rev=1202795&r1=1202794&r2=1202795&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java Wed Nov 16 17:25:44 2011
@@ -21,6 +21,7 @@ package org.apache.directory.studio.apac
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -230,6 +231,11 @@ public class PartitionsDiffComputer
originalEntries.add( ( ( ClonedServerEntry ) cursor.get() ).getClonedEntry() );
}
}
+
+ // Reversing the list to allow deletion of leafs first (otherwise we would be deleting
+ // higher nodes with children first).
+ // Order for modified entries does not matter.
+ Collections.reverse( modifications );
// Looking up the destination base entry
Entry destinationBaseEntry = destinationPartition