mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
13.41.2009 a5063d331b45c3d9d7a337a611ea8caeaa91e43f
opends/src/server/org/opends/server/util/SetupUtils.java
@@ -369,7 +369,8 @@
  /**
   * Returns {@code true} if the provided port is free and we can use it,
   * {@code false} otherwise.
   * @param hostname the host name we are analyzing.
   * @param hostname the host name we are analyzing.  Use <CODE>null</CODE>
   * to connect to any address.
   * @param port the port we are analyzing.
   * @return {@code true} if the provided port is free and we can use it,
   * {@code false} otherwise.
@@ -380,7 +381,15 @@
    ServerSocket serverSocket = null;
    try
    {
      InetSocketAddress socketAddress = new InetSocketAddress(hostname, port);
      InetSocketAddress socketAddress;
      if (hostname != null)
      {
        socketAddress = new InetSocketAddress(hostname, port);
      }
      else
      {
        socketAddress = new InetSocketAddress(port);
      }
      serverSocket = new ServerSocket();
      if (!isWindows())
      {
@@ -448,7 +457,7 @@
   */
  public static boolean canUseAsPort(int port)
  {
    return canUseAsPort("localhost", port);
    return canUseAsPort(null, port);
  }
  /**