From 8d0bcc4cfb85138b7455afae55174c8583a97bcf 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.
---
opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ConnectionHandlerDescriptor.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ConnectionHandlerDescriptor.java b/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ConnectionHandlerDescriptor.java
index a8ade36..487f481 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ConnectionHandlerDescriptor.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ConnectionHandlerDescriptor.java
@@ -35,6 +35,7 @@
import java.util.TreeSet;
import org.opends.messages.Message;
+import org.opends.server.admin.std.meta.AdministrationConnectorCfgDefn;
/**
* This class is used to represent a Listener and is aimed to be used by the
@@ -131,7 +132,9 @@
}
private State state;
- private SortedSet<InetAddress> addresses = new TreeSet<InetAddress>();
+ private SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(
+ AdministrationConnectorCfgDefn.getInstance().
+ getListenAddressPropertyDefinition());
private int port;
private Protocol protocol;
private String toString;
@@ -140,7 +143,7 @@
private int hashCode;
/**
- * Constructor for thid class.
+ * Constructor for the connection handler..
* @param addresses the list of InetAdresses of the listener.
* @param port the port of the connection handler.
* @param protocol the protocol of the listener.
@@ -173,7 +176,7 @@
*/
public SortedSet<InetAddress> getAddresses()
{
- return new TreeSet<InetAddress>(addresses);
+ return addresses;
}
/**
@@ -222,7 +225,7 @@
}
else if (o instanceof ConnectionHandlerDescriptor)
{
- equals = hashCode() == o.hashCode();
+ equals = toString.equals(o.toString());
}
return equals;
}
--
Gitblit v1.10.0