From 0ae99d533bc817133ea38bababa380a30fc6a082 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Mon, 11 Apr 2016 17:22:17 +0000
Subject: [PATCH] Code cleanup

---
 opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java |   51 ++-------------------------------------------------
 1 files changed, 2 insertions(+), 49 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java
index 4c8b0a2..d974731 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java
@@ -140,10 +140,7 @@
     ERROR_USER_CANCELLED(6),
 
     /** The user doesn't accept the license. */
-    ERROR_LICENSE_NOT_ACCEPTED(7),
-
-    /** Incompatible java version. */
-    JAVA_VERSION_INCOMPATIBLE(8);
+    ERROR_LICENSE_NOT_ACCEPTED(7);
 
     private int returnCode;
     private InstallReturnCode(int returnCode)
@@ -243,19 +240,6 @@
   }
 
   /**
-   * The main method for the InstallDS CLI tool.
-   *
-   * @param args
-   *          the command-line arguments provided to this program.
-   */
-  public static void main(String[] args)
-  {
-    final int retCode = mainCLI(args, System.out, System.err, System.in);
-
-    System.exit(retCode);
-  }
-
-  /**
    * Parses the provided command-line arguments and uses that information to run
    * the setup tool.
    *
@@ -349,12 +333,7 @@
       return InstallReturnCode.ERROR_USER_DATA.getReturnCode();
     }
 
-    if (argParser.testOnlyArg.isPresent() && !testJVM())
-    {
-        return InstallReturnCode.JAVA_VERSION_INCOMPATIBLE.getReturnCode();
-    }
-
-    if (argParser.usageOrVersionDisplayed() || argParser.testOnlyArg.isPresent())
+    if (argParser.usageOrVersionDisplayed())
     {
       return InstallReturnCode.SUCCESSFUL_NOP.getReturnCode();
     }
@@ -478,32 +457,6 @@
     return InstallReturnCode.SUCCESSFUL;
   }
 
-  private boolean testJVM()
-  {
-    // Delete the log file that does not contain any information.  The test only
-    // mode is called several times by the setup script and if we do not remove
-    // it we have a lot of empty log files.
-    try
-    {
-      QuickSetupLog.getLogFile().deleteOnExit();
-    }
-    catch (final Throwable t)
-    {
-      logger.warn(LocalizableMessage.raw("Error while trying to update the contents of "
-          + "the set-java-home file in test only mode: " + t, t));
-    }
-    try
-    {
-      Utils.checkJavaVersion();
-      return true;
-    }
-    catch (final IncompatibleVersionException ive)
-    {
-      println(ive.getMessageObject());
-      return false;
-    }
-  }
-
   private boolean checkLicense()
   {
     if (!LicenseFile.exists()) {

--
Gitblit v1.10.0