From 5c0f0d718e1ddf89fc0df7139edc1e6d297cda5b Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Sat, 21 Jul 2012 20:43:37 +0000
Subject: [PATCH] Fix OPENDJ-522: Add capability to force the upgrade to complete if errors occur during non-interactive mode
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java | 6
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiUserInteraction.java | 21 +++--
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java | 39 +++++----
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java | 7 +
opendj-sdk/opends/build.properties | 2
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Reverter.java | 9 -
opendj-sdk/opends/src/messages/messages/admin_tool.properties | 6 +
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java | 2
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java | 6 +
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeLauncher.java | 33 ++++++++
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java | 3
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java | 7 +
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/UserInteraction.java | 27 ++++--
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Application.java | 10 --
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java | 40 +++++----
15 files changed, 135 insertions(+), 83 deletions(-)
diff --git a/opendj-sdk/opends/build.properties b/opendj-sdk/opends/build.properties
index 1c30b84..df69b55 100644
--- a/opendj-sdk/opends/build.properties
+++ b/opendj-sdk/opends/build.properties
@@ -1,2 +1,2 @@
-opendmk.lib.dir=
+opendmk.lib.dir=../opendmk/lib
diff --git a/opendj-sdk/opends/src/messages/messages/admin_tool.properties b/opendj-sdk/opends/src/messages/messages/admin_tool.properties
index cae1386..fd64451 100644
--- a/opendj-sdk/opends/src/messages/messages/admin_tool.properties
+++ b/opendj-sdk/opends/src/messages/messages/admin_tool.properties
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
# Copyright 2006-2010 Sun Microsystems, Inc.
-# Portions copyright 2011 ForgeRock AS.
+# Portions copyright 2011-2012 ForgeRock AS.
# Portions copyright 2012 profiq s.r.o.
@@ -3055,4 +3055,8 @@
SEVERE_ERR_DEPENDENCY_TASK_NOT_DEFINED=There is no task with ID '%s' in the \
server.
INFO_AVAILABLE_DEFINED_TASKS=The available defined tasks are:%s
+INFO_UPGRADE_DESCRIPTION_FORCE=Specifies whether the upgrade should \
+ continue if there is an error while migrating configuration files or if \
+ additional actions need to be performed after the upgrade. This option can \
+ only be used with the %s option.
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Application.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Application.java
index baa273c..375e9f0 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Application.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/Application.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup;
@@ -666,12 +667,7 @@
*/
public UserInteraction userInteraction() {
// Note: overridden in GuiApplication
- UserInteraction ui = null;
- UserData ud = getUserData();
- if (ud != null && ud.isInteractive()) {
- ui = new CliUserInteraction();
- }
- return ui;
+ return new CliUserInteraction(getUserData());
}
/**
@@ -735,8 +731,6 @@
* @param status of the operation
* @param note string with additional information
* @throws ApplicationException if something goes wrong
- * @see {@link #writeInitialHistoricalRecord(BuildInformation,
- BuildInformation)}
*/
protected void writeHistoricalRecord(
Long id,
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java
index 67668a7..95de7fd 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup;
@@ -43,8 +44,6 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
-import java.io.PrintStream;
-import java.io.InputStream;
/**
* Supports user interactions for a command line driven application.
@@ -54,21 +53,25 @@
static private final Logger LOG =
Logger.getLogger(CliUserInteraction.class.getName());
+ private final boolean isInteractive;
+ private final boolean isForceOnError;
+
/**
* Creates an instance that will use standard streams for interaction.
*/
public CliUserInteraction() {
- super(System.in, System.out, System.err);
+ this(null);
}
/**
- * Creates an instance using specific streams.
- * @param out OutputStream where prompts will be written
- * @param err OutputStream where errors will be written
- * @param in InputStream from which information will be read
+ * Creates an instance that will use standard streams for interaction and with
+ * the provided CLI arguments.
+ * @param ud The CLI arguments.
*/
- public CliUserInteraction(PrintStream out, PrintStream err, InputStream in) {
- super(in, out, err);
+ public CliUserInteraction(UserData ud) {
+ super(System.in, System.out, System.err);
+ isInteractive = ud != null ? ud.isInteractive() : true;
+ isForceOnError = ud != null ? ud.isForceOnError() : false;
}
/**
@@ -174,15 +177,6 @@
return sb.toString();
}
- /**
- * {@inheritDoc}
- */
- public String promptForString(Message prompt, Message title,
- String defaultValue) {
-
- return readInput(prompt, defaultValue, LOG);
- }
-
private void println(String text) {
text = Utils.convertHtmlBreakToLineSeparator(text);
text = Utils.stripHtml(text);
@@ -203,7 +197,7 @@
* {@inheritDoc}
*/
public boolean isInteractive() {
- return true;
+ return isInteractive;
}
@@ -250,4 +244,11 @@
{
return true;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isForceOnError() {
+ return isForceOnError;
+ }
}
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/UserInteraction.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/UserInteraction.java
index b560ab1..09cfcd2 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/UserInteraction.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/UserInteraction.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup;
@@ -107,19 +108,27 @@
String createUnorderedList(List<?> list);
/**
- * Promt the user for a string.
- * @param prompt for string
- * @param title of prompt dialog
- * @param defaultValue for default
- * @return String typed by user
- */
- String promptForString(Message prompt, Message title, String defaultValue);
-
- /**
* Tells whether the interaction is command-line based.
* @return <CODE>true</CODE> if the user interaction is command-line based and
* <CODE>false</CODE> otherwise.
*/
boolean isCLI();
+ /**
+ * Indicates whether or not the CLI based user has requested to continue when
+ * a non critical error occurs.
+ *
+ * @return boolean where true indicates to continue if there is a non critical
+ * error.
+ */
+ boolean isForceOnError();
+
+ /**
+ * Indicates whether or not the CLI user has requested interactive behavior.
+ *
+ * @return <code>true</code> if the CLI user has requested interactive
+ * behavior.
+ */
+ boolean isInteractive();
+
}
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
index 518caf7..63f414d 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.ui;
@@ -46,6 +47,7 @@
import javax.swing.*;
import java.awt.event.WindowEvent;
+import java.lang.reflect.Constructor;
import java.security.cert.X509Certificate;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -605,27 +607,27 @@
/**
* {@inheritDoc}
*/
- public UserInteraction userInteraction() {
- UserInteraction ui = null;
- if (getUserData().isInteractive()) {
- if (Utils.isCli()) {
- // Use reflection to avoid breaking the java web start in some
- // platforms.
- try
- {
- Class<?> cl =
- Class.forName("org.opends.quicksetup.CliUserInteraction");
- ui = (UserInteraction) cl.newInstance();
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Unexpected error: "+t, t);
- }
- } else {
- ui = new GuiUserInteraction(qs.getFrame());
+ public UserInteraction userInteraction()
+ {
+ if (Utils.isCli())
+ {
+ // Use reflection to avoid breaking the java web start in some
+ // platforms.
+ try
+ {
+ Class<?> cl = Class.forName("org.opends.quicksetup.CliUserInteraction");
+ Constructor<?> c = cl.getConstructor(UserData.class);
+ return (UserInteraction) c.newInstance(getUserData());
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Unexpected error: " + t, t);
}
}
- return ui;
+ else
+ {
+ return new GuiUserInteraction(qs.getFrame());
+ }
}
/**
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiUserInteraction.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiUserInteraction.java
index 9c9d0f5..f1bb1dc 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiUserInteraction.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiUserInteraction.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.ui;
@@ -152,24 +153,28 @@
/**
* {@inheritDoc}
*/
- public String promptForString(Message prompt, Message title,
- String defaultValue) {
- Object o = JOptionPane.showInputDialog(
- parent, prompt.toString(), title.toString(),
- JOptionPane.QUESTION_MESSAGE,
- null, null, defaultValue);
- return o != null ? o.toString() : null;
+ public boolean isCLI()
+ {
+ return false;
}
/**
* {@inheritDoc}
*/
- public boolean isCLI()
+ public boolean isForceOnError()
{
return false;
}
/**
+ * {@inheritDoc}
+ */
+ public boolean isInteractive()
+ {
+ return true;
+ }
+
+ /**
* JOptionPane that controls the number of characters that are allowed
* to appear on a single line in the input area of the dialog.
*/
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java
index c4b57d2..604660d 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.upgrader;
@@ -354,7 +355,7 @@
remainingChanges.removeAll(appliedChanges);
if ((firstException != null) && (appliedChanges.size() == 0))
{
- if (ui != null) {
+ if (ui.isInteractive()) {
Message cancel = INFO_CANCEL_BUTTON_LABEL.get();
Message cont = INFO_CONTINUE_BUTTON_LABEL.get();
Message retry = INFO_RETRY_BUTTON_LABEL.get();
@@ -377,6 +378,9 @@
ReturnCode.CANCELED,
INFO_UPGRADE_CANCELED.get(), firstException);
}
+ } else if (ui.isForceOnError()) {
+ // Continue.
+ remainingChanges.remove(0);
} else {
throw firstException;
}
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
index b32df35..dcd17ac 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.upgrader;
@@ -91,7 +92,7 @@
reason.toMessage()),
null);
} else {
- if (ui != null) {
+ if (ui.isInteractive()) {
for (Directive directive : issues) {
Message title;
Message summary;
@@ -155,7 +156,7 @@
INFO_REVERSION_CANCELED.get(), null);
}
}
- } else {
+ } else if (!ui.isForceOnError()) {
throw new ApplicationException(
ReturnCode.APPLICATION_ERROR,
INFO_ORACLE_NO_SILENT.get(), null);
@@ -178,7 +179,7 @@
// If the import/export effect is present, append the detailed
// instructions.
if (effects.contains(Effect.REVERSION_DATA_EXPORT_AND_REIMPORT_REQUIRED)) {
- if (ui != null)
+ if (ui.isInteractive())
{
String lineBreak = ui.isCLI() ? Constants.LINE_SEPARATOR
: Constants.HTML_LINE_BREAK;
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Reverter.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Reverter.java
index 10900b4..1573bf6 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Reverter.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Reverter.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.upgrader;
@@ -514,7 +515,7 @@
// Get the user to confirm if possible
UserInteraction ui = userInteraction();
- if (ui != null) {
+ if (ui.isInteractive()) {
Message cont = INFO_CONTINUE_BUTTON_LABEL.get();
Message cancel = INFO_CANCEL_BUTTON_LABEL.get();
@@ -1106,11 +1107,7 @@
}
if (currentVersion != null && newVersion != null) {
- UserInteraction ui = userInteraction() ;
- if (ui == null)
- {
- ui = new CliUserInteraction();
- }
+ UserInteraction ui = userInteraction();
ReversionIssueNotifier uo = new ReversionIssueNotifier(
ui,currentVersion,newVersion);
uo.notifyUser();
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java
index d4c4c0b..ceb5345 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.upgrader;
@@ -92,7 +93,7 @@
reason.toMessage()),
null);
} else {
- if (ui != null) {
+ if (ui.isInteractive()) {
String lineBreak = ui.isCLI() ?
Constants.LINE_SEPARATOR : Constants.HTML_LINE_BREAK;
for (VersionIssueNotifier.Directive directive : issues) {
@@ -156,7 +157,7 @@
INFO_UPGRADE_CANCELED.get(), null);
}
}
- } else {
+ } else if (!ui.isForceOnError()) {
throw new ApplicationException(
ReturnCode.APPLICATION_ERROR,
INFO_ORACLE_NO_SILENT.get(), null);
@@ -179,7 +180,7 @@
// If the import/export effect is present, append the detailed
// instructions.
if (effects.contains(Effect.UPGRADE_DATA_EXPORT_AND_REIMPORT_REQUIRED)) {
- if (ui != null)
+ if (ui.isInteractive())
{
String lineBreak = ui.isCLI() ? Constants.LINE_SEPARATOR
: Constants.HTML_LINE_BREAK;
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 63d9171..f43d6e7 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
@@ -23,12 +23,13 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
+ * Portions Copyright 2011-2012 ForgeRock AS
*/
package org.opends.quicksetup.upgrader;
import org.opends.messages.Message;
+import static org.opends.messages.AdminToolMessages.*;
import static org.opends.messages.QuickSetupMessages.*;
import static org.opends.messages.ToolMessages.*;
@@ -106,6 +107,7 @@
private StringArgument file;
private BooleanArgument quiet;
private BooleanArgument noPrompt;
+ private BooleanArgument forceOnError;
private BooleanArgument verbose;
private BooleanArgument revertMostRecent;
private StringArgument reversionArchive;
@@ -211,6 +213,17 @@
}
/**
+ * Tells whether the user specified to force on non critical error in the non
+ * interactive mode.
+ * @return <CODE>true</CODE> if the user specified to force on
+ * non critical error and <CODE>false</CODE> otherwise.
+ */
+ public boolean isForceOnError()
+ {
+ return forceOnError.isPresent();
+ }
+
+ /**
* Indicates whether this invocation is intended to upgrade the current
* build as opposed to revert.
* @return boolean where true indicates upgrade
@@ -348,6 +361,14 @@
INFO_UPGRADE_DESCRIPTION_NO_PROMPT.get());
argParser.addArgument(noPrompt);
+ forceOnError = new BooleanArgument(
+ "forceOnError",
+ null,
+ "forceOnError",
+ INFO_UPGRADE_DESCRIPTION_FORCE.get(
+ "--"+noPrompt.getLongIdentifier()));
+ argParser.addArgument(forceOnError);
+
quiet = new BooleanArgument(
OPTION_LONG_QUIET,
OPTION_SHORT_QUIET,
@@ -392,6 +413,16 @@
}
}
+
+ if (!noPrompt.isPresent() && forceOnError.isPresent())
+ {
+ Message message =
+ ERR_UNINSTALL_FORCE_REQUIRES_NO_PROMPT.get("--"
+ + forceOnError.getLongIdentifier(), "--"
+ + noPrompt.getLongIdentifier());
+ System.err.println(message);
+ System.exit(ReturnCode.APPLICATION_ERROR.getReturnCode());
+ }
} catch (ArgumentException ae) {
System.err.println(ae.getMessageObject());
printUsage(false);
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
index b9aeafb..d722905 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
+ * Portions Copyright 2011-2012 ForgeRock AS
*/
package org.opends.quicksetup.upgrader;
@@ -1199,7 +1199,7 @@
INFO_ERROR_UPGRADED_SERVER_STARTS_WITH_ERRORS.get(
Constants.LINE_SEPARATOR + formattedDetails), null);
UserInteraction ui = userInteraction();
- if (ui != null) {
+ if (ui.isInteractive()) {
// We are about to present the problems with the upgrade to the
// user and ask if they would like to continue. Regardless of
@@ -1224,7 +1224,7 @@
} else {
// User wants to continue; nothing to do
}
- } else {
+ } else if (!ui.isForceOnError()) {
// We can't ask the user if they want to continue so we
// just bail on the upgrade by throwing an exception which
// will cause upgrader to exit unsuccessfully
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
index 4683179..8baac7c 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.upgrader;
@@ -65,6 +66,7 @@
uud.setQuiet(launcher.isQuiet());
uud.setInteractive(!launcher.isNoPrompt());
uud.setVerbose(launcher.isVerbose());
+ uud.setForceOnError(launcher.isForceOnError());
return uud;
}
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java
index 18f5cdc..623aff0 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
+ * Portions copyright 2012 ForgeRock AS.
*/
package org.opends.quicksetup.upgrader;
@@ -317,7 +318,7 @@
*/
protected List<Message> getExportImportInstructions() {
List<Message> instructions = new ArrayList<Message>();
- if ((ui == null) || (ui.isCLI()))
+ if (ui.isCLI())
{
instructions.add(INFO_ORACLE_EI_ACTION_STEP1_CLI.get());
}
--
Gitblit v1.10.0