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

Violette Roche-Montane
04.03.2014 b4bfab886e5e0ad8073c164763520c8fd829b973
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/Upgrade.java
@@ -418,6 +418,8 @@
    // Checks License.
    checkLicence(context);
    logWarnAboutPatchesFolder();
    /*
     * Get the list of required upgrade tasks.
     */
@@ -711,6 +713,32 @@
  }
  /**
   * The classes folder is renamed by the script launcher to avoid
   * incompatibility between patches and upgrade process. If a folder
   * "classes.disabled" is found, this function just displays a warning in the
   * log file, meaning the "classes" folder has been renamed. See upgrade.sh /
   * upgrade.bat scripts which hold the renaming process. (OPENDJ-1098)
   */
  private static void logWarnAboutPatchesFolder()
  {
    try
    {
      final File backup =
          new File(UpgradeUtils.getInstancePath(), "classes.disabled");
      if (backup.exists() && backup.listFiles() != null
          && backup.listFiles().length > 0)
      {
        logger.warn(INFO_UPGRADE_CLASSES_FOLDER_RENAMED.get(backup
            .getAbsoluteFile()));
      }
    }
    catch (SecurityException se)
    {
      logger.debug(LocalizableMessage.raw(se.getMessage()));
    }
  }
  /**
   * Returns {@code true} if the current upgrade contains post upgrade tasks.
   *
   * @return {@code true} if the current upgrade contains post upgrade tasks.