activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r903225 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Date Tue, 26 Jan 2010 13:59:27 GMT
Author: gtully
Date: Tue Jan 26 13:59:27 2010
New Revision: 903225

URL: http://svn.apache.org/viewvc?rev=903225&view=rev
Log:
store can be null for a temp q, npe will hide out of sync error message, observed once in
AMQ2102Test

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=903225&r1=903224&r2=903225&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Tue Jan 26 13:59:27 2010
@@ -591,9 +591,12 @@
     }
 
     Message loadMessage(MessageId messageId) throws IOException {
-        Message msg = store.getMessage(messageId);
-        if (msg != null) {
-            msg.setRegionDestination(this);
+        Message msg = null;
+        if (store != null) { // can be null for a temp q
+            msg = store.getMessage(messageId);
+            if (msg != null) {
+                msg.setRegionDestination(this);
+            }
         }
         return msg;
     }



Mime
View raw message