]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4898 - Using Address instead of hostanme (robustness) after @infra remarks
authorStephane Gamard <stephane.gamard@searchbox.com>
Thu, 31 Jul 2014 07:28:45 +0000 (09:28 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Thu, 31 Jul 2014 07:28:45 +0000 (09:28 +0200)
server/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java

index 5639df18a9dcc2949ce5198a9eff6024d1adf4cc..4afb4726bcf33bc39c7b1bb1a78dc24b9560281b 100644 (file)
@@ -238,7 +238,7 @@ public class ProcessWrapper extends Thread implements Terminable {
    */
   @CheckForNull
   private ProcessMXBean waitForJMX() throws UnknownHostException, MalformedURLException {
-    String path = "/jndi/rmi://" + InetAddress.getLocalHost().getHostName() + ":" + jmxPort + "/jmxrmi";
+    String path = "/jndi/rmi://" + InetAddress.getLocalHost().getHostAddress() + ":" + jmxPort + "/jmxrmi";
     JMXServiceURL jmxUrl = new JMXServiceURL("rmi", InetAddress.getLocalHost().getHostAddress(), jmxPort, path);
 
     for (int i = 0; i < 5; i++) {