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

Jean-Noël Rouvignac
19.42.2016 d6b296f5b3549079495ff902803d629dbbcb85b5
opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCache.java
@@ -171,8 +171,7 @@
    {
      for (SuffixDescriptor suffix : sufs)
      {
        Set<String> rssInSuffix = suffix.getReplicationServers();
        for (String replicationServer : rssInSuffix)
        for (HostPort replicationServer : suffix.getReplicationServers())
        {
          if (replica.getReplicationServers().contains(replicationServer))
          {
@@ -256,10 +255,10 @@
  {
    Set<ReplicaDescriptor> candidateReplicas = new HashSet<>();
    // It contains replication information: analyze it.
    String repServer = server.getReplicationServerHostPort();
    HostPort repServer = server.getReplicationServerHostPort();
    for (SuffixDescriptor suffix : getSuffixes())
    {
      if (containsIgnoreCase(suffix.getReplicationServers(), repServer))
      if (suffix.getReplicationServers().contains(repServer))
      {
        candidateReplicas.addAll(suffix.getReplicas());
      }
@@ -267,18 +266,6 @@
    return candidateReplicas;
  }
  private boolean containsIgnoreCase(Set<String> col, String toFind)
  {
    for (String s : col)
    {
      if (s.equalsIgnoreCase(toFind))
      {
        return true;
      }
    }
    return false;
  }
  /**
   * Sets the list of LDAP URLs and connection type that are preferred to be
   * used to connect to the servers. When we have a server to which we can