From 2c08f52009a57edff7b3a51d1966057b121380f7 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 04 Jul 2008 12:33:27 +0000
Subject: [PATCH] Fix for issue 3450 (upgrade command should refuse to upgrade to the same version)

---
 opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java b/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
index 5c5e070..1ccee21 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
+++ b/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);
 

--
Gitblit v1.10.0