brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [05/14] git commit: Fixing an intermittent concurrent modification exception in task tags
Date Mon, 01 Sep 2014 09:48:38 GMT
Fixing an intermittent concurrent modification exception in task tags


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

Branch: refs/heads/master
Commit: c6a2212493c98d6884ad8f0c895478988d073a66
Parents: fbe97e5
Author: Andrew Kennedy <grkvlt@apache.org>
Authored: Thu Aug 28 12:58:28 2014 +0100
Committer: Andrew Kennedy <grkvlt@apache.org>
Committed: Sat Aug 30 17:23:48 2014 +0100

----------------------------------------------------------------------
 core/src/main/java/brooklyn/util/task/BasicTask.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c6a22124/core/src/main/java/brooklyn/util/task/BasicTask.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/util/task/BasicTask.java b/core/src/main/java/brooklyn/util/task/BasicTask.java
index e4424b8..44f2535 100644
--- a/core/src/main/java/brooklyn/util/task/BasicTask.java
+++ b/core/src/main/java/brooklyn/util/task/BasicTask.java
@@ -57,6 +57,7 @@ import com.google.common.base.Function;
 import com.google.common.base.Objects;
 import com.google.common.base.Throwables;
 import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.ExecutionList;
 import com.google.common.util.concurrent.ListenableFuture;
 
@@ -81,7 +82,7 @@ public class BasicTask<T> implements TaskInternal<T> {
     public final String displayName;
     public final String description;
 
-    protected final Set<Object> tags = new LinkedHashSet<Object>();
+    protected final Set<Object> tags = Sets.newConcurrentHashSet();
     // for debugging, to record where tasks were created
 //    { tags.add(new Throwable("Creation stack trace")); }
 


Mime
View raw message