From d6b296f5b3549079495ff902803d629dbbcb85b5 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 19 Aug 2016 13:36:19 +0000
Subject: [PATCH] installer, dsreplication, uninstaller: use HostPort
---
opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCache.java | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCache.java b/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCache.java
index 085480d..cda6722 100644
--- a/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCache.java
+++ b/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
--
Gitblit v1.10.0