From f73305f5746c8b15eeb7260e347460a41b73c83a Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 16 Dec 2008 15:08:30 +0000
Subject: [PATCH] Fix for issue 3668 (Control Panel does not display correctly connection handlers' listen addresses) Use a comparator of InetAdress in the admin framework to sort the addresses.

---
 opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromFile.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromFile.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromFile.java
index d97afaa..3096624 100644
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromFile.java
+++ b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromFile.java
@@ -383,7 +383,8 @@
   private ConnectionHandlerDescriptor getConnectionHandler(
       ConnectionHandlerCfg connHandler, String name) throws OpenDsException
   {
-    SortedSet<InetAddress> addresses = new TreeSet<InetAddress>();
+    SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(
+        getInetAddressComparator());
     int port;
 
     ConnectionHandlerDescriptor.Protocol protocol;
@@ -408,7 +409,7 @@
         protocol = ConnectionHandlerDescriptor.Protocol.LDAP;
       }
       SortedSet<InetAddress> v = ldap.getListenAddress();
-      if (v == null)
+      if (v != null)
       {
         addresses.addAll(v);
       }
@@ -450,7 +451,8 @@
   private ConnectionHandlerDescriptor getConnectionHandler(
       AdministrationConnectorCfg adminConnector) throws OpenDsException
   {
-    SortedSet<InetAddress> addresses = new TreeSet<InetAddress>();
+    SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(
+        getInetAddressComparator());
 
     ConnectionHandlerDescriptor.Protocol protocol =
       ConnectionHandlerDescriptor.Protocol.ADMINISTRATION_CONNECTOR;
@@ -460,7 +462,7 @@
 
 
     SortedSet<InetAddress> v = adminConnector.getListenAddress();
-    if (v == null)
+    if (v != null)
     {
       addresses.addAll(v);
     }

--
Gitblit v1.10.0