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

Gaetan Boismal
11.29.2016 d148d18d07ef35f675f1e79df542d05434628916
opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeTasks.java
@@ -21,7 +21,6 @@
import static org.opends.messages.ToolMessages.*;
import static org.opends.server.tools.upgrade.FileManager.copy;
import static org.opends.server.tools.upgrade.Installation.CURRENT_CONFIG_FILE_NAME;
import static org.opends.server.tools.upgrade.UpgradeUtils.*;
import static org.opends.server.util.StaticUtils.isClassAvailable;
@@ -667,16 +666,15 @@
      @Override
      public void postUpgrade(final UpgradeContext context) throws ClientException
      {
        LocalizableMessage message = null;
        LocalizableMessage message;
        final List<String> args = new LinkedList<>();
        if (isRebuildAllIndexesIsPresent && isRebuildAllIndexesTaskAccepted)
        if (isRebuildAllIndexesTaskAccepted)
        {
          args.add("--rebuildAll");
          message = INFO_UPGRADE_REBUILD_ALL.get();
        }
        else if (!indexesToRebuild.isEmpty()
            && !isRebuildAllIndexesTaskAccepted)
        else if (!indexesToRebuild.isEmpty())
        {
          message = INFO_UPGRADE_REBUILD_INDEX_STARTS.get(indexesToRebuild);
@@ -697,7 +695,7 @@
        context.notifyProgress(pnc);
        // Sets the arguments like the rebuild index command line.
        args.addAll(Arrays.asList("-f", getConfigLdifFile().getAbsolutePath()));
        args.addAll(Arrays.asList("-f", CONFIG_FILE_PATH));
        /*
         * Index(es) could be contained in several backends or none, If none,
@@ -1222,13 +1220,9 @@
    try
    {
      final File configFile = getConfigLdifFile();
      final Filter filterVal = filter != null ? Filter.valueOf(filter) : null;
      final int changeCount = updateConfigFile(
          configFile.getPath(), filterVal, changeOperationType, ldif);
      displayChangeCount(configFile.getPath(), changeCount);
      final int changeCount = updateConfigFile(CONFIG_FILE_PATH, filterVal, changeOperationType, ldif);
      displayChangeCount(CONFIG_FILE_PATH, changeCount);
      context.notifyProgress(pnc.setProgress(100));
    }
@@ -1238,11 +1232,6 @@
    }
  }
  private static File getConfigLdifFile()
  {
    return new File(configDirectory, CURRENT_CONFIG_FILE_NAME);
  }
  static UpgradeTask clearReplicationDbDirectory()
  {
    return new AbstractUpgradeTask()