Permalink
Browse files

HORNETQ-1457 - fix duplicates in TotalQueueIterator

https://issues.jboss.org/browse/HORNETQ-1457

remove the intermediateReference iterator as these may be moved anyway
  • Loading branch information...
1 parent 837bbb1 commit 6edfc6b9b278b802b5b11d0e12b69cf0bc7bad14 @andytaylor committed Jan 20, 2015
Showing with 0 additions and 10 deletions.
  1. +0 −10 hornetq-server/src/main/java/org/hornetq/core/server/impl/QueueImpl.java
@@ -3095,7 +3095,6 @@ public void remove()
private class TotalQueueIterator implements LinkedListIterator<MessageReference>
{
LinkedListIterator<PagedReference> pageIter = null;
- Iterator<MessageReference> interIterator = null;
LinkedListIterator<MessageReference> messagesIterator = null;
public TotalQueueIterator()
@@ -3104,7 +3103,6 @@ public TotalQueueIterator()
{
pageIter = pageSubscription.iterator();
}
- interIterator = intermediateMessageReferences.iterator();
messagesIterator = new SynchronizedIterator(messageReferences.iterator());
}
@@ -3115,10 +3113,6 @@ public boolean hasNext()
{
return true;
}
- if (interIterator.hasNext())
- {
- return true;
- }
if (pageIter != null)
{
if (pageIter.hasNext())
@@ -3137,10 +3131,6 @@ public MessageReference next()
{
return messagesIterator.next();
}
- if (interIterator.hasNext())
- {
- return interIterator.next();
- }
if (pageIter != null)
{
if (pageIter.hasNext())

0 comments on commit 6edfc6b

Please sign in to comment.