From af2c1a7a7d8d7ef5b31e44b1aa7deff5645cf880 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 15 Feb 2012 23:07:35 +0000
Subject: [PATCH] Code cleanup, following FindBugs and Netbeans advices.
---
opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java b/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
index 3c61cca..bb1705b 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/offline/OfflineInstaller.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
+ * Portions Copyright 2011-2012 ForgeRock AS
*/
package org.opends.quicksetup.installer.offline;
@@ -70,17 +70,18 @@
public class OfflineInstaller extends Installer
{
/* This map contains the ratio associated with each step */
- private HashMap<InstallProgressStep, Integer> hmRatio =
+ private final HashMap<InstallProgressStep, Integer> hmRatio =
new HashMap<InstallProgressStep, Integer>();
/* This map contains the summary associated with each step */
- private HashMap<InstallProgressStep, Message> hmSummary =
+ private final HashMap<InstallProgressStep, Message> hmSummary =
new HashMap<InstallProgressStep, Message>();
private ApplicationException runError;
private static final Logger LOG =
Logger.getLogger(OfflineInstaller.class.getName());
+
/**
* Actually performs the install in this thread. The thread is blocked.
*
@@ -130,13 +131,13 @@
if (mustStart())
{
- if (isVerbose())
+ if (isStartVerbose())
{
notifyListeners(getTaskSeparator());
}
setCurrentProgressStep(InstallProgressStep.STARTING_SERVER);
PointAdder pointAdder = new PointAdder();
- if (!isVerbose())
+ if (!isStartVerbose())
{
notifyListeners(getFormattedProgress(
INFO_PROGRESS_STARTING_NON_VERBOSE.get()));
@@ -152,12 +153,12 @@
}
finally
{
- if (!isVerbose())
+ if (!isStartVerbose())
{
pointAdder.stop();
}
}
- if (!isVerbose())
+ if (!isStartVerbose())
{
notifyListeners(getFormattedDoneWithLineBreak());
}
@@ -307,6 +308,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public Integer getRatio(ProgressStep status)
{
return hmRatio.get(status);
@@ -315,13 +317,16 @@
/**
* {@inheritDoc}
*/
+ @Override
public Message getSummary(ProgressStep status)
{
return hmSummary.get(status);
}
/**
- * {@inheritDoc}
+ * Returns the exception from the run() method, if any.
+ * @return the ApplicationException raised during the run() method, if any.
+ * null otherwise.
*/
public ApplicationException getRunError()
{
@@ -545,6 +550,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public String getInstallationPath()
{
return Utils.getInstallPathFromClasspath();
@@ -553,17 +559,11 @@
/**
* {@inheritDoc}
*/
+ @Override
public String getInstancePath()
{
String installPath = Utils.getInstallPathFromClasspath();
return Utils.getInstancePathFromInstallPath(installPath);
}
- /**
- * {@inheritDoc}
- */
- protected String getOpenDSClassPath()
- {
- return System.getProperty("java.class.path");
- }
}
--
Gitblit v1.10.0