From fc4f01cf5d1a7714f60b70dba6dcd0ae8c26cb46 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Sat, 21 Apr 2012 18:58:09 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1328724 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/broker/region/PrefetchSubscription.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java index 1d79d59a5d..f8de19767f 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java @@ -298,7 +298,7 @@ public abstract class PrefetchSubscription extends AbstractSubscription { 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())) {