CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James 
Carman for patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c59c9c75
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c59c9c75
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c59c9c75

Branch: refs/heads/camel-2.12.x
Commit: c59c9c7557e89445a982211a4d3f9edf44130f2f
Parents: ed2c71a
Author: Claus Ibsen <[email protected]>
Authored: Sun Sep 29 12:17:25 2013 +0200
Committer: Claus Ibsen <[email protected]>
Committed: Sun Sep 29 12:32:59 2013 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/processor/MulticastProcessor.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c59c9c75/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java 
b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index a0e150f..550a23e 100644
--- 
a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -1021,11 +1021,11 @@ public class MulticastProcessor extends ServiceSupport 
implements AsyncProcessor
         Map<?, ?> property = 
exchange.getProperty(Exchange.AGGREGATION_STRATEGY, Map.class);
         Map<Object, AggregationStrategy> map = CastUtils.cast(property);
         if (map == null) {
-            map = new HashMap<Object, AggregationStrategy>();
+            map = new ConcurrentHashMap<Object, AggregationStrategy>();
         } else {
             // it is not safe to use the map directly as the exchange doesn't 
have the deep copy of it's properties
             // we just create a new copy if we need to change the map
-            map = new HashMap<Object, AggregationStrategy>(map);
+            map = new ConcurrentHashMap<Object, AggregationStrategy>(map);
         }
         // store the strategy using this processor as the key
         // (so we can store multiple strategies on the same exchange)

Reply via email to