mirror of https://github.com/apache/activemq.git
Ignore NULL references when checking isEmpty
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@581568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
69a5e00843
commit
5bd3bf6e24
|
@ -19,6 +19,7 @@ package org.apache.activemq.broker.region.cursors;
|
|||
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 @@ public class VMPendingMessageCursor extends AbstractPendingMessageCursor {
|
|||
} else {
|
||||
for (Iterator<MessageReference> iterator = list.iterator(); iterator.hasNext();) {
|
||||
MessageReference node = iterator.next();
|
||||
if (node== QueueMessageReference.NULL_MESSAGE){
|
||||
continue;
|
||||
}
|
||||
if (!node.isDropped()) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue