From b8dd0219a3576094fcdba08ef8c6489eafabf814 Mon Sep 17 00:00:00 2001 From: kurobako Date: Tue, 9 Feb 2016 13:46:49 +0100 Subject: [PATCH] eliminated NPE possibility in QueueImpl class --- .../apache/activemq/artemis/core/server/impl/QueueImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index e555ee2326..0d58eed160 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -2603,7 +2603,9 @@ public class QueueImpl implements Queue { message = null; } - boolean durableRef = message != null && message.isDurable() && queue.durable; + if (message == null) return; + + boolean durableRef = message.isDurable() && queue.durable; try { message.decrementRefCount();