camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [5/6] git commit: CAMEL-6771: Fixed potential concurrency exception in splitter. Thanks to James Carman for patch.
Date Sun, 29 Sep 2013 10:33:57 GMT
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/d4171647
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d4171647
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d4171647

Branch: refs/heads/camel-2.11.x
Commit: d4171647265979224f44f6d5beb7ebc96f6c9f9e
Parents: 2176e58
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Sep 29 12:17:25 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Sep 29 12:33:34 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/d4171647/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 bd93719..3872d34 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
@@ -1014,11 +1014,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)


Mime
View raw message