From d36a4757209f5fe3229ebaca7d34a98b3ba83f76 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Tue, 24 Apr 2007 20:25:01 +0000
Subject: [PATCH] fixed problems related to running the upgrader in Windows
---
opends/src/quicksetup/org/opends/quicksetup/Launcher.java | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
index 607b803..98c6492 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -114,7 +114,6 @@
*/
protected void printUsage(String i18nMsg) {
System.err.println(i18nMsg);
- System.exit(QuickSetupCli.USER_DATA_ERROR);
}
/**
@@ -234,26 +233,24 @@
/**
* The main method which is called by the uninstall command lines.
+ * @return int exit code that should be returned upon exit of this program
*/
- public void launch() {
+ public int launch() {
+ int exitCode = 0;
if (shouldPrintUsage()) {
printUsage();
+ exitCode = QuickSetupCli.USER_DATA_ERROR;
} else if (isCli()) {
- int exitCode = launchCli(args, createCliApplication());
- if (exitCode != 0) {
- System.exit(exitCode);
- }
+ exitCode = launchCli(args, createCliApplication());
} else {
willLaunchGui();
- int exitCode = launchGui(args);
+ exitCode = launchGui(args);
if (exitCode != 0) {
guiLaunchFailed();
exitCode = launchCli(args, createCliApplication());
- if (exitCode != 0) {
- System.exit(exitCode);
- }
}
}
+ return exitCode;
}
/**
--
Gitblit v1.10.0