From 69bcc5da5dafd4e5c4af9478f8db2de0fd5af413 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Tue, 06 May 2014 09:17:27 +0000
Subject: [PATCH] OPENDJ-1303 "opendj-cli" - Removed && replaced StaticUtils.filterExitCode by com.forgerock.opendj.cli.Utils.filterExitCode; - Removed SetupUtils.getDefaultJMXPort and replaced it by CliConstants.DEFAULT_JMX_PORT. - Removed && replaced Utilities.OBFUSCATED_VALUE by com.forgerock.opendj.cli.Utils.OBFUSCATED_VALUE; - Removed && replaced Utils.getThrowableMsg by com.forgerock.opendj.cli.Utils.getThrowableMsg;

---
 opendj3-server-dev/src/server/org/opends/server/util/SetupUtils.java |   32 +++++---------------------------
 1 files changed, 5 insertions(+), 27 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/util/SetupUtils.java b/opendj3-server-dev/src/server/org/opends/server/util/SetupUtils.java
index 6d04e50..97cabed 100644
--- a/opendj3-server-dev/src/server/org/opends/server/util/SetupUtils.java
+++ b/opendj3-server-dev/src/server/org/opends/server/util/SetupUtils.java
@@ -26,6 +26,8 @@
  */
 package org.opends.server.util;
 
+import static org.forgerock.util.Utils.closeSilently;
+
 import java.io.*;
 import java.net.InetSocketAddress;
 import java.net.ServerSocket;
@@ -351,15 +353,6 @@
   }
 
   /**
-   * Returns the default value for the JMX Port.
-   * @return the default value for the JMX Port.
-   */
-  public static int getDefaultJMXPort()
-  {
-    return 1689;
-  }
-
-  /**
    * Indicates whether we are in a web start installation or not.
    *
    * @return <CODE>true</CODE> if we are in a web start installation and
@@ -442,7 +435,7 @@
     }
     finally
     {
-      close(outputStream);
+      closeSilently(outputStream);
     }
   }
 
@@ -475,7 +468,7 @@
     }
     finally
     {
-      close(outputStream);
+      closeSilently(outputStream);
     }
   }
 
@@ -559,7 +552,7 @@
     }
     finally
     {
-      close(br);
+      closeSilently(br);
     }
     if (hostName == null)
     {
@@ -571,19 +564,4 @@
     }
     return hostName;
   }
-
-  private static void close(Closeable toClose)
-  {
-    if (toClose != null)
-    {
-      try
-      {
-        toClose.close();
-      }
-      catch (Exception e)
-      {
-        // ignore
-      }
-    }
-  }
 }

--
Gitblit v1.10.0