From a41662c1136b2bb4a4198df89e0e87d2be3ef099 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 16 Jul 2015 14:57:56 +0000
Subject: [PATCH] AutoRefactor'ed simplify expressions

---
 opendj-server-legacy/src/main/java/org/opends/quicksetup/CurrentInstallStatus.java |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/CurrentInstallStatus.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/CurrentInstallStatus.java
index 469c0d7..ba5eb91 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/CurrentInstallStatus.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/CurrentInstallStatus.java
@@ -24,7 +24,6 @@
  *      Copyright 2006-2008 Sun Microsystems, Inc.
  *      Portions Copyright 2012-2015 ForgeRock AS.
  */
-
 package org.opends.quicksetup;
 
 import org.forgerock.i18n.LocalizableMessage;
@@ -49,21 +48,15 @@
  *
  * This class assumes that we are running in the case of an offline install.
  */
-
 public class CurrentInstallStatus
 {
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
   private boolean isInstalled;
-
   private boolean canOverwriteCurrentInstall;
-
   private LocalizableMessage installationMsg;
 
-  /**
-   * The constructor of a CurrentInstallStatus object.
-   *
-   */
+  /** The constructor of a CurrentInstallStatus object. */
   public CurrentInstallStatus()
   {
     if (Utils.isWebStart())
@@ -170,14 +163,12 @@
 
   private int getPort()
   {
-    int port = -1;
     try {
-      port = Installation.getLocal().getCurrentConfiguration().
-              getPort();
+      return Installation.getLocal().getCurrentConfiguration().getPort();
     } catch (IOException ioe) {
       logger.info(LocalizableMessage.raw("Failed to get port", ioe));
+      return -1;
     }
-    return port;
   }
 
 
@@ -192,7 +183,7 @@
   {
     File dbDir = Installation.getLocal().getDatabasesDirectory();
     File[] children = dbDir.listFiles();
-    return ((children != null) && (children.length > 0));
+    return children != null && children.length > 0;
   }
 
 
@@ -207,7 +198,6 @@
   {
     File configDir = Installation.getLocal().getConfigurationDirectory();
     File[] children = configDir.listFiles();
-    return ((children != null) && (children.length > 0));
+    return children != null && children.length > 0;
   }
-
 }

--
Gitblit v1.10.0