aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-25 19:52:23 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-25 19:52:23 +0200
commit9245b29fe0419dc17c880cdea33d4ee348d68721 (patch)
tree7f6d26b4075664983beafbd985a6d035f432e9c2 /server
parentd21ac75fe48328a14022bb5f06a6624f05a14920 (diff)
downloadsonarqube-9245b29fe0419dc17c880cdea33d4ee348d68721.tar.gz
sonarqube-9245b29fe0419dc17c880cdea33d4ee348d68721.zip
Fix quality flaw
Diffstat (limited to 'server')
-rw-r--r--server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java b/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java
index 09f422ba09b..12832151900 100644
--- a/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java
+++ b/server/process/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java
@@ -251,7 +251,7 @@ public class ProcessWrapper extends Thread implements Terminable {
private ProcessMXBean waitForJMX() {
String loopbackAddress = localAddress();
String path = "/jndi/rmi://" + loopbackAddress + ":" + jmxPort + "/jmxrmi";
- JMXServiceURL jmxUrl = null;
+ JMXServiceURL jmxUrl;
try {
jmxUrl = new JMXServiceURL("rmi", loopbackAddress, jmxPort, path);
} catch (MalformedURLException e) {
@@ -270,8 +270,7 @@ public class ProcessWrapper extends Thread implements Terminable {
}
}, null, null);
MBeanServerConnection mBeanServer = jmxConnector.getMBeanServerConnection();
- ProcessMXBean bean = JMX.newMBeanProxy(mBeanServer, JmxUtils.objectName(processName), ProcessMXBean.class);
- return bean;
+ return JMX.newMBeanProxy(mBeanServer, JmxUtils.objectName(processName), ProcessMXBean.class);
} catch (Exception ignored) {
LOGGER.trace("Could not connect JMX yet", ignored);
}