From ad74bf0a2cc09d0036a12793848b975e7b16eaa6 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Fri, 27 Jul 2007 15:26:22 +0000
Subject: [PATCH]  modifications to fix issue #2022.

---
 opends/src/quicksetup/org/opends/quicksetup/Launcher.java |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
index 59969ca..419a20d 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -269,15 +269,18 @@
    * @return 0 if everything worked fine, and an error code if something wrong
    *         occurred.
    */
-  protected int launchCli(CliApplication cliApp) {
+  protected int launchCli(CliApplication cliApp)
+  {
     System.setProperty("org.opends.quicksetup.cli", "true");
     QuickSetupCli cli = new QuickSetupCli(cliApp, this);
-    int returnValue = cli.run();
-    if (returnValue == QuickSetupCli.USER_DATA_ERROR) {
+    ApplicationReturnCode.ReturnCode returnValue = cli.run();
+    if (returnValue.equals(ApplicationReturnCode.ReturnCode.USER_DATA_ERROR))
+    {
       printUsage(true);
-      System.exit(QuickSetupCli.USER_DATA_ERROR);
+      System.exit(ApplicationReturnCode.ReturnCode.USER_DATA_ERROR
+          .getReturnCode());
     }
-    return returnValue;
+    return returnValue.getReturnCode();
   }
 
   /**
@@ -341,11 +344,12 @@
     if (shouldPrintVersion())
     {
       printVersion();
-      System.exit(QuickSetupCli.PRINT_VERSION);
+      System.exit(ApplicationReturnCode.ReturnCode.PRINT_VERSION
+          .getReturnCode());
     }
     else if (shouldPrintUsage()) {
       printUsage(false);
-      System.exit(QuickSetupCli.SUCCESSFUL);
+      System.exit(ApplicationReturnCode.ReturnCode.SUCCESSFUL.getReturnCode());
     } else if (isCli()) {
       CliApplication cliApp = createCliApplication();
       int exitCode = launchCli(cliApp);

--
Gitblit v1.10.0