You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by cm...@apache.org on 2014/10/17 10:40:06 UTC

[13/50] git commit: CAMEL-7836: Fixed potential ConcurrentModificationException when calling getRoutes.

CAMEL-7836: Fixed potential ConcurrentModificationException when calling getRoutes.


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 64aa22d6f52408678955685549cd66fb29735aba
Parents: ee02b82
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Sep 21 11:23:03 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Sep 21 11:23:42 2014 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/impl/DefaultCamelContext.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/64aa22d6/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 d84d20b..9ade095 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
@@ -644,7 +644,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
         return routeStartupOrder;
     }
 
-    public List<Route> getRoutes() {
+    public synchronized List<Route> getRoutes() {
         // lets return a copy of the collection as objects are removed later when services are stopped
         if (routes.isEmpty()) {
             return Collections.emptyList();