activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: eliminated NPE possibility in QueueImpl class
Date Tue, 09 Feb 2016 16:08:45 GMT
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/master
Commit: b8dd0219a3576094fcdba08ef8c6489eafabf814
Parents: e0f5cb6
Author: kurobako <wyyyrd@gmail.com>
Authored: Tue Feb 9 13:46:49 2016 +0100
Committer: Clebert Suconic <clebertsuconic@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();


Mime
View raw message