From a56f339b579be6f7a1b28eadf68426ebc5bddb03 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 25 Apr 2007 02:10:48 +0000
Subject: [PATCH] reverting earlier edit to launchers since it broke the GUI applications
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeLauncher.java | 2 +-
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java | 17 ++++++++++-------
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java | 2 +-
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java | 2 +-
4 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
index 98c6492..607b803 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -114,6 +114,7 @@
*/
protected void printUsage(String i18nMsg) {
System.err.println(i18nMsg);
+ System.exit(QuickSetupCli.USER_DATA_ERROR);
}
/**
@@ -233,24 +234,26 @@
/**
* 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 int launch() {
- int exitCode = 0;
+ public void launch() {
if (shouldPrintUsage()) {
printUsage();
- exitCode = QuickSetupCli.USER_DATA_ERROR;
} else if (isCli()) {
- exitCode = launchCli(args, createCliApplication());
+ int exitCode = launchCli(args, createCliApplication());
+ if (exitCode != 0) {
+ System.exit(exitCode);
+ }
} else {
willLaunchGui();
- exitCode = launchGui(args);
+ int exitCode = launchGui(args);
if (exitCode != 0) {
guiLaunchFailed();
exitCode = launchCli(args, createCliApplication());
+ if (exitCode != 0) {
+ System.exit(exitCode);
+ }
}
}
- return exitCode;
}
/**
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
index 6d6e2cf..04c0f88 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
@@ -49,7 +49,7 @@
* will pass to the org.opends.server.tools.InstallDS class.
*/
public static void main(String[] args) {
- System.exit(new InstallLauncher(args).launch());
+ new InstallLauncher(args).launch();
}
/**
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java
index 73e2868..f7c3967 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java
@@ -48,7 +48,7 @@
* will pass to the org.opends.server.tools.InstallDS class.
*/
public static void main(String[] args) {
- System.exit(new UninstallLauncher(args).launch());
+ new UninstallLauncher(args).launch();
}
/**
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeLauncher.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeLauncher.java
index c5019cc..abd55ed 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeLauncher.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeLauncher.java
@@ -46,7 +46,7 @@
* will pass to the org.opends.server.tools.InstallDS class.
*/
public static void main(String[] args) {
- System.exit(new UpgradeLauncher(args).launch());
+ new UpgradeLauncher(args).launch();
}
/**
--
Gitblit v1.10.0