activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r581568 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
Date Wed, 03 Oct 2007 11:24:39 GMT
Author: rajdavies
Date: Wed Oct  3 04:24:38 2007
New Revision: 581568

URL: http://svn.apache.org/viewvc?rev=581568&view=rev
Log:
Ignore NULL references when checking isEmpty

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java?rev=581568&r1=581567&r2=581568&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
Wed Oct  3 04:24:38 2007
@@ -19,6 +19,7 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 import org.apache.activemq.broker.region.MessageReference;
+import org.apache.activemq.broker.region.QueueMessageReference;
 
 /**
  * hold pending messages in a linked list (messages awaiting disptach to a
@@ -40,6 +41,9 @@
         } else {
             for (Iterator<MessageReference> iterator = list.iterator(); iterator.hasNext();)
{
                 MessageReference node = iterator.next();
+                if (node== QueueMessageReference.NULL_MESSAGE){
+                	continue;
+                }
                 if (!node.isDropped()) {
                     return false;
                 }



Mime
View raw message