You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2012/04/21 20:58:09 UTC

svn commit: r1328724 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java

Author: gtully
Date: Sat Apr 21 18:58:09 2012
New Revision: 1328724

URL: http://svn.apache.org/viewvc?rev=1328724&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3805 - fix up unit test regressions with java.util.ConcurrentModificationException due to dispatch no longer being copy on write, shows up need to use iterator in message expiry case

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java?rev=1328724&r1=1328723&r2=1328724&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java Sat Apr 21 18:58:09 2012
@@ -298,7 +298,7 @@ public abstract class PrefetchSubscripti
                         if (broker.isExpired(node)) {
                             node.getRegionDestination().messageExpired(context, this, node);
                         }
-                        dispatched.remove(node);
+                        iter.remove();
                         node.getRegionDestination().getDestinationStatistics().getInflight().decrement();
                     }
                     if (ack.getLastMessageId().equals(node.getMessageId())) {