8048050: Agent NullPointerException when rmi.port in use
authorsgabdura
Mon, 17 Nov 2014 13:11:37 +0100
changeset 27790 2fcd7b664d99
parent 27789 8f7dbf70bf0e
child 27791 28ad28dc1e4d
8048050: Agent NullPointerException when rmi.port in use Reviewed-by: jbachorik, dfuchs
jdk/src/java.management/share/classes/sun/management/jmxremote/ConnectorBootstrap.java
--- a/jdk/src/java.management/share/classes/sun/management/jmxremote/ConnectorBootstrap.java	Tue Nov 18 16:20:16 2014 +0100
+++ b/jdk/src/java.management/share/classes/sun/management/jmxremote/ConnectorBootstrap.java	Mon Nov 17 13:11:37 2014 +0100
@@ -767,7 +767,7 @@
                     JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
             connServer.start();
         } catch (IOException e) {
-            if (connServer == null) {
+            if (connServer == null || connServer.getAddress() == null) {
                 throw new AgentConfigurationError(CONNECTOR_SERVER_IO_ERROR,
                         e, url.toString());
             } else {