From 7a6f3dd0c046db02a9cebddd7e635c2189e378ff 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
---
opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java b/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
index b32df35..dcd17ac 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
+++ b/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;
--
Gitblit v1.10.0