activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: NO-JIRA avoiding a NPE if the server is stopped
Date Thu, 02 Aug 2018 14:58:01 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 3e4d65e14 -> 77989c376


NO-JIRA avoiding a NPE if the server is stopped


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/77989c37
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/77989c37
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/77989c37

Branch: refs/heads/master
Commit: 77989c3763c477de4bc45d2d0a8824201735235a
Parents: 3e4d65e
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Thu Aug 2 10:57:14 2018 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Aug 2 10:57:17 2018 -0400

----------------------------------------------------------------------
 .../core/server/management/impl/ManagementServiceImpl.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/77989c37/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
index 48b96c8..ad888d0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
@@ -550,7 +550,10 @@ public class ManagementServiceImpl implements ManagementService {
          @Override
          public void activated() {
             try {
-               messagingServer.addAddressInfo(new AddressInfo(managementNotificationAddress,
RoutingType.MULTICAST));
+               ActiveMQServer usedServer = messagingServer;
+               if (usedServer != null) {
+                  usedServer.addAddressInfo(new AddressInfo(managementNotificationAddress,
RoutingType.MULTICAST));
+               }
             } catch (Exception e) {
                ActiveMQServerLogger.LOGGER.unableToCreateManagementNotificationAddress(managementNotificationAddress,
e);
             }


Mime
View raw message