From ece2e17b191ac25a1f7facb5ab9270f04aadbe8a Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Tue, 11 Sep 2012 07:38:10 +0000 Subject: [PATCH] AMQ-4029: Check for null when unregister mbean. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1383270 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/broker/jmx/ManagementContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java index 64498270cd..502622d411 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java @@ -174,7 +174,7 @@ public class ManagementContext implements Service { } // stop naming service mbean try { - if (getMBeanServer().isRegistered(namingServiceObjectName)) { + if (namingServiceObjectName != null && getMBeanServer().isRegistered(namingServiceObjectName)) { LOG.debug("Stopping MBean {}", namingServiceObjectName); getMBeanServer().invoke(namingServiceObjectName, "stop", null, null); LOG.debug("Unregistering MBean {}", namingServiceObjectName);