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

jvergara
04.33.2008 2c08f52009a57edff7b3a51d1966057b121380f7
Fix for issue 3450 (upgrade command should refuse to upgrade to the same version)
2 files modified
12 ■■■■ changed files
opends/src/messages/messages/quicksetup.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java 10 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/quicksetup.properties
@@ -1213,6 +1213,8 @@
INFO_REVERSION_ORACLE_UNSUPPORTED=Reversion not supported from version %s to \
 version %s is not supported.  To upgrade You must uninstall the current \
 server, install the new server, and manually migrate your data: %s
INFO_UPGRADE_ORACLE_SAME_VERSION=The current version and the version of the \
 binaries to upgrade to are the same (%s)
INFO_REVERSION_TYPE_PROMPT=How would you like to specify the archive used \
 to revert this instance?
INFO_REVERSION_TYPE_PROMPT_RECENT=Use the most recent versioned archive
opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
@@ -1546,12 +1546,18 @@
  private void initialize() throws ApplicationException {
    try {
      BuildInformation fromVersion = getCurrentBuildInformation();
      BuildInformation toVersion = getStagedBuildInformation();
      if (fromVersion.equals(toVersion))
      {
        throw new ApplicationException(ReturnCode.APPLICATION_ERROR,
            INFO_UPGRADE_ORACLE_SAME_VERSION.get(
                fromVersion.toString()), null);
      }
      if (getInstallation().getStatus().isServerRunning()) {
        new ServerController(getInstallation()).stopServer(true);
      }
      BuildInformation fromVersion = getCurrentBuildInformation();
      BuildInformation toVersion = getStagedBuildInformation();
      this.historicalOperationId =
              writeInitialHistoricalRecord(fromVersion, toVersion);