Author: clebert.suconic(a)jboss.com
Date: 2011-04-19 16:03:02 -0400 (Tue, 19 Apr 2011)
New Revision: 10540
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
JBPAPP-6327 - fixing test
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19
19:59:45 UTC (rev 10539)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19
20:03:02 UTC (rev 10540)
@@ -899,21 +899,25 @@
count++;
}
- // System.out.println("QueueMemorySize before depage = " +
queueMemorySize.get());
- while (pageIterator.hasNext())
+
+ if (pageIterator != null)
{
- PagedReference reference = pageIterator.next();
- pageIterator.remove();
-
- if (filter == null || filter.match(reference.getMessage()))
+ // System.out.println("QueueMemorySize before depage = " +
queueMemorySize.get());
+ while (pageIterator.hasNext())
{
- count++;
- pageSubscription.ack(reference);
+ PagedReference reference = pageIterator.next();
+ pageIterator.remove();
+
+ if (filter == null || filter.match(reference.getMessage()))
+ {
+ count++;
+ pageSubscription.ack(reference);
+ }
+ else
+ {
+ addTail(reference, false);
+ }
}
- else
- {
- addTail(reference, false);
- }
}
tx.commit();