From 31f872d7b6d0c86b62bc8731b7430f4b3a124eb9 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Mon, 11 Jun 2007 20:03:53 +0000
Subject: [PATCH] Fixed NPE in launcher. The problem is caused by the fact that the installer does not create a quickstart.CliApplication but rather relies on the server package for the installation. I just added an NPE guard.
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 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 48dbee8..1d711a4 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -338,16 +338,18 @@
}
private void preExit(CliApplication cliApp) {
- UserData ud = cliApp.getUserData();
- if (ud != null && !ud.isSilent()) {
+ if (cliApp != null) {
+ UserData ud = cliApp.getUserData();
+ if (ud != null && !ud.isSilent()) {
- // Add an extra space systematically
- System.out.println();
+ // Add an extra space systematically
+ System.out.println();
- File logFile = QuickSetupLog.getLogFile();
- if (logFile != null) {
- System.out.println(getMsg("general-see-for-details",
- QuickSetupLog.getLogFile().getPath()));
+ File logFile = QuickSetupLog.getLogFile();
+ if (logFile != null) {
+ System.out.println(getMsg("general-see-for-details",
+ QuickSetupLog.getLogFile().getPath()));
+ }
}
}
}
--
Gitblit v1.10.0