mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

ludovicp
27.17.2010 6608f4063d44aa8795a869bbaf6857725b0fb398
Fix for issue #3402.
1 files modified
19 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyDNOperation.java 19 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyDNOperation.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 */
package org.opends.server.workflowelement.localbackend;
@@ -484,7 +484,7 @@
        //  - apply additional modifications provided by the plugins.
        // If the operation is a synchronization operation
        //  - apply the operation as it was originally done on the master.
        if (! isSynchronizationOperation() || (modifications.size() == 0))
        if (! isSynchronizationOperation())
        {
          // Apply any changes to the entry based on the change in its RDN.
          // Also perform schema checking on the updated entry.
@@ -507,8 +507,7 @@
          // Check for a request to cancel this operation.
          checkIfCanceled(false);
          if (! isSynchronizationOperation())
          {
            // Get a count of the current number of modifications.  The
            // pre-operation plugins may alter this list, and we need to be able
            // to identify which changes were made after they're done.
@@ -533,7 +532,7 @@
            {
              try
              {
                applyPreOpModifications(modifications, modCount);
              applyPreOpModifications(modifications, modCount, true);
              }
              catch (DirectoryException de)
              {
@@ -547,14 +546,14 @@
              }
            }
          }
        }
        else
        {
          // This is a synchronization operation
          // Apply the modifications as they were originally done.
          try
          {
            applyPreOpModifications(modifications, 0);
            applyRDNChanges(modifications);
            applyPreOpModifications(modifications, 0, false);
          }
          catch (DirectoryException de)
          {
@@ -1019,12 +1018,14 @@
   *                        entry.
   * @param  startPos       The position in the list at which the pre-operation
   *                        modifications start.
   * @param  checkSchema    A boolean allowing to control if schema must be
   *                        checked
   *
   * @throws  DirectoryException  If a problem occurs that should cause the
   *                              modify DN operation to fail.
   */
  protected void applyPreOpModifications(List<Modification> modifications,
                                       int startPos)
                                       int startPos, boolean checkSchema)
          throws DirectoryException
  {
    for (int i=startPos; i < modifications.size(); i++)
@@ -1059,7 +1060,7 @@
    // Make sure that the updated entry still conforms to the server
    // schema.
    if (DirectoryServer.checkSchema())
    if (DirectoryServer.checkSchema() && checkSchema)
    {
      MessageBuilder invalidReason = new MessageBuilder();
      if (! newEntry.conformsToSchema(null, false, true, true,