This closes #71 - TotalQueueIterator fix
This commit is contained in:
commit
a2a5b35bb7
|
@ -3122,7 +3122,6 @@ public class QueueImpl implements Queue
|
||||||
private class TotalQueueIterator implements LinkedListIterator<MessageReference>
|
private class TotalQueueIterator implements LinkedListIterator<MessageReference>
|
||||||
{
|
{
|
||||||
LinkedListIterator<PagedReference> pageIter = null;
|
LinkedListIterator<PagedReference> pageIter = null;
|
||||||
Iterator<MessageReference> interIterator = null;
|
|
||||||
LinkedListIterator<MessageReference> messagesIterator = null;
|
LinkedListIterator<MessageReference> messagesIterator = null;
|
||||||
|
|
||||||
Iterator lastIterator = null;
|
Iterator lastIterator = null;
|
||||||
|
@ -3133,7 +3132,6 @@ public class QueueImpl implements Queue
|
||||||
{
|
{
|
||||||
pageIter = pageSubscription.iterator();
|
pageIter = pageSubscription.iterator();
|
||||||
}
|
}
|
||||||
interIterator = intermediateMessageReferences.iterator();
|
|
||||||
messagesIterator = new SynchronizedIterator(messageReferences.iterator());
|
messagesIterator = new SynchronizedIterator(messageReferences.iterator());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3145,11 +3143,6 @@ public class QueueImpl implements Queue
|
||||||
lastIterator = messagesIterator;
|
lastIterator = messagesIterator;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (interIterator.hasNext())
|
|
||||||
{
|
|
||||||
lastIterator = interIterator;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (pageIter != null)
|
if (pageIter != null)
|
||||||
{
|
{
|
||||||
if (pageIter.hasNext())
|
if (pageIter.hasNext())
|
||||||
|
@ -3170,11 +3163,6 @@ public class QueueImpl implements Queue
|
||||||
MessageReference msg = messagesIterator.next();
|
MessageReference msg = messagesIterator.next();
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
if (interIterator.hasNext())
|
|
||||||
{
|
|
||||||
lastIterator = interIterator;
|
|
||||||
return interIterator.next();
|
|
||||||
}
|
|
||||||
if (pageIter != null)
|
if (pageIter != null)
|
||||||
{
|
{
|
||||||
if (pageIter.hasNext())
|
if (pageIter.hasNext())
|
||||||
|
|
Loading…
Reference in New Issue