zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1718215 - in /zookeeper/branches/branch-3.5: CHANGES.txt src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
Date Sun, 06 Dec 2015 20:38:43 GMT
Author: rgs
Date: Sun Dec  6 20:38:43 2015
New Revision: 1718215

URL: http://svn.apache.org/viewvc?rev=1718215&view=rev
Log:
ZOOKEEPER-2304: JMX ClientPort from ZooKeeperServerBean incorrect
(Arshad Mohammad via rgs)

Modified:
    zookeeper/branches/branch-3.5/CHANGES.txt
    zookeeper/branches/branch-3.5/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java

Modified: zookeeper/branches/branch-3.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.5/CHANGES.txt?rev=1718215&r1=1718214&r2=1718215&view=diff
==============================================================================
--- zookeeper/branches/branch-3.5/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.5/CHANGES.txt Sun Dec  6 20:38:43 2015
@@ -74,6 +74,9 @@ BUGFIXES:
   ZOOKEEPER-2311: assert in setup_random
   (Marshall McMullen via rgs)
 
+  ZOOKEEPER-2304: JMX ClientPort from ZooKeeperServerBean incorrect
+  (Arshad Mohammad via rgs)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-2270: Allow MBeanRegistry to be overridden for better unit tests

Modified: zookeeper/branches/branch-3.5/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.5/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java?rev=1718215&r1=1718214&r2=1718215&view=diff
==============================================================================
--- zookeeper/branches/branch-3.5/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
(original)
+++ zookeeper/branches/branch-3.5/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
Sun Dec  6 20:38:43 2015
@@ -18,8 +18,6 @@
 
 package org.apache.zookeeper.server;
 
-import java.net.InetAddress;
-import java.net.UnknownHostException;
 import java.util.Date;
 
 import org.apache.zookeeper.Version;
@@ -41,12 +39,7 @@ public class ZooKeeperServerBean impleme
     }
     
     public String getClientPort() {
-        try {
-            return InetAddress.getLocalHost().getHostAddress() + ":"
-                + zks.getClientPort();
-        } catch (UnknownHostException e) {
-            return "localhost:" + zks.getClientPort();
-        }
+        return Integer.toString(zks.getClientPort());
     }
     
     public String getName() {



Mime
View raw message