From a1c76e8d61dc6ef0aed3126f529fa1403a582f85 Mon Sep 17 00:00:00 2001 From: andytaylor Date: Mon, 19 Mar 2018 08:36:38 +0000 Subject: [PATCH] ARTEMIS-1752 - avoid null pointer in BridgeImpl https://issues.apache.org/jira/browse/ARTEMIS-1752 --- .../activemq/artemis/core/server/cluster/impl/BridgeImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java index 1c4038b8d6..a83e91b20c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java @@ -775,7 +775,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled protected void fail(final boolean permanently) { logger.debug(this + "\n\t::fail being called, permanently=" + permanently); //we need to make sure we remove the node from the topology so any incoming quorum requests are voted correctly - serverLocator.notifyNodeDown(System.currentTimeMillis(), targetNodeID); + if (targetNodeID != null) { + serverLocator.notifyNodeDown(System.currentTimeMillis(), targetNodeID); + } if (queue != null) { try { if (logger.isTraceEnabled()) {