From 5f8b6b9c154ee7af10e5b3db6228fc3bfe905949 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 06 Jul 2007 23:36:07 +0000
Subject: [PATCH] Revert the changes made in revision 2281 for issue #1865 because they have broken the graphical setup utility.  With the changes committed in revision 2281, the setup dialog exits immediately with no error, most likely because of the introduction of a new System.exit calls.

---
 opends/src/quicksetup/org/opends/quicksetup/Launcher.java |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
index 599d9fb..589ac57 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -305,23 +305,21 @@
 
   /**
    * The main method which is called by the command lines.
-   *
-   * @return the error return code.
    */
-  public int launch() {
+  public void launch() {
     if (shouldPrintVersion())
     {
       printVersion();
-      return QuickSetupCli.VERSION_PRINT;
+      System.exit(QuickSetupCli.SUCCESSFUL);
     }
     else if (shouldPrintUsage()) {
       printUsage(false);
-      return QuickSetupCli.SUCCESSFUL;
+      System.exit(QuickSetupCli.SUCCESSFUL);
     } else if (isCli()) {
       CliApplication cliApp = createCliApplication();
       int exitCode = launchCli(args, cliApp);
       preExit(cliApp);
-      return exitCode;
+      System.exit(exitCode);
     } else {
       willLaunchGui();
       int exitCode = launchGui(args);
@@ -339,17 +337,10 @@
         exitCode = launchCli(args, cliApp);
         if (exitCode != 0) {
           preExit(cliApp);
-          return exitCode;
+          System.exit(exitCode);
         }
       }
-      else
-      {
-        return exitCode ;
-      }
     }
-
-    // We should never reach this code
-    return QuickSetupCli.UNKNOWN;
   }
 
   private void preExit(CliApplication cliApp) {

--
Gitblit v1.10.0