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

Jean-Noël Rouvignac
03.27.2016 6a60952f916a84257b0d2ac585a81fdf98d46c9a
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/LDAPConnectionPool.java
@@ -347,8 +347,7 @@
   */
  private void disconnectAndRemove(ConnectionRecord cr)
  {
    String key = makeKeyFromRecord(cr);
    connectionTable.remove(key);
    connectionTable.remove(makeKeyFromRecord(cr));
    cr.conn.close();
  }
@@ -378,8 +377,7 @@
   * @return the key to be used in Maps for the provided connection record.
   */
  private static String makeKeyFromRecord(ConnectionRecord rec) {
    String protocol = rec.conn.isSSL() ? "LDAPS" : "LDAP";
    return protocol + ":" + rec.conn.getHostPort();
    return (rec.conn.isLdaps() ? "LDAPS" : "LDAP") + ":" + rec.conn.getHostPort();
  }
  /**
@@ -457,20 +455,20 @@
  }
  private LDAPURL makeLDAPUrl(ConnectionWrapper conn) {
    return makeLDAPUrl(conn.getHostPort(), "", conn.isSSL());
    return makeLDAPUrl(conn.getHostPort(), "", conn.isLdaps());
  }
  /**
   * Make an url from the specified arguments.
   * @param hostPort the host name and port of the server.
   * @param dn the base DN of the URL.
   * @param isSSL whether the connection uses SSL
   * @param isLdaps whether the connection uses LDAPS
   * @return an LDAP URL from the specified arguments.
   */
  public static LDAPURL makeLDAPUrl(HostPort hostPort, String dn, boolean isSSL)
  public static LDAPURL makeLDAPUrl(HostPort hostPort, String dn, boolean isLdaps)
  {
    return new LDAPURL(
        isSSL ? "ldaps" : LDAPURL.DEFAULT_SCHEME,
        isLdaps ? "ldaps" : LDAPURL.DEFAULT_SCHEME,
               hostPort.getHost(),
               hostPort.getPort(),
               dn,