ACTIVEMQ6-71 - fix duplicates in TotalQueueIterator

https://issues.apache.org/jira/browse/ACTIVEMQ6-71

remove the intermediateReference iterator as these may be moved anyway
This commit is contained in:
Andy Taylor 2015-01-19 16:49:02 +00:00
parent 98153ec1da
commit dade72905b
1 changed files with 0 additions and 12 deletions

View File

@ -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())