Repository: camel Updated Branches: refs/heads/camel-2.14.x 7338699f4 -> 7f8b374df refs/heads/camel-2.15.x 4da2fdcd9 -> 4ef5658b3
CAMEL-8673 Fix the concurrentModificationException when creating dynamic routes with thanks to Dirk Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7f8b374d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7f8b374d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7f8b374d Branch: refs/heads/camel-2.14.x Commit: 7f8b374df8bbdde25b82658b48c924e933a44a2c Parents: 7338699 Author: Willem Jiang <willem.ji...@gmail.com> Authored: Tue Apr 21 21:41:52 2015 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Tue Apr 21 23:55:49 2015 +0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/camel/impl/DefaultCamelContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/7f8b374d/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java index 913f470..418c00d 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java @@ -681,13 +681,13 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon } void removeRouteCollection(Collection<Route> routes) { - synchronized (routes) { + synchronized (this.routes) { this.routes.removeAll(routes); } } void addRouteCollection(Collection<Route> routes) throws Exception { - synchronized (routes) { + synchronized (this.routes) { this.routes.addAll(routes); } }