From 5641257155ffba73fda3d5d6019ec84b024abfba Mon Sep 17 00:00:00 2001 From: David Syer Date: Wed, 28 Apr 2010 13:59:56 +0000 Subject: [PATCH] OPEN - issue INT-1063: MessageStore: correlation and grouping API Fix stupid concurrent modification exception --- .../integration/aggregator/CorrelatingMessageHandler.java | 2 +- .../springframework/integration/store/SimpleMessageStore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java b/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java index 1d583c1075..56a2732759 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/CorrelatingMessageHandler.java @@ -318,7 +318,7 @@ public class CorrelatingMessageHandler extends AbstractMessageHandler implements } for (Message message : all) { discardChannel.send(message); - store.delete(message.getHeaders().getId()); + store.delete(key, message.getHeaders().getId()); } } } diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java b/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java index b13f759693..d43b989627 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/store/SimpleMessageStore.java @@ -98,7 +98,7 @@ public class SimpleMessageStore implements MessageStore { if (collection==null) { return Collections.emptySet(); } - return Collections.unmodifiableCollection(collection); + return new HashSet>(collection); } public void put(Object correlationId, Collection> messages) {