You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/02/09 21:20:23 UTC
[04/43] activemq-artemis git commit: eliminated NPE possibility in
QueueImpl class
eliminated NPE possibility in QueueImpl class
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b8dd0219
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b8dd0219
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b8dd0219
Branch: refs/heads/refactor-openwire
Commit: b8dd0219a3576094fcdba08ef8c6489eafabf814
Parents: e0f5cb6
Author: kurobako <wy...@gmail.com>
Authored: Tue Feb 9 13:46:49 2016 +0100
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Feb 9 11:08:35 2016 -0500
----------------------------------------------------------------------
.../org/apache/activemq/artemis/core/server/impl/QueueImpl.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b8dd0219/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
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 e555ee2..0d58eed 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();