[hornetq-commits] JBoss hornetq SVN: r10539 - branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Apr 19 15:59:45 EDT 2011
Author: clebert.suconic at jboss.com
Date: 2011-04-19 15:59:45 -0400 (Tue, 19 Apr 2011)
New Revision: 10539
Modified:
branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
Fixing test
Modified: branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 19:32:59 UTC (rev 10538)
+++ branches/one-offs/Branch_2_2_EAP_JBPAPP_6277/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-04-19 19:59:45 UTC (rev 10539)
@@ -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();
More information about the hornetq-commits
mailing list