aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2013-02-27 14:05:18 (EST)
committerJohn Ross2013-02-27 14:05:18 (EST)
commitcabcba5739836ed32db50f590282069e14b21182 (patch)
tree2a1479d29b7b9e63d8ee91496bbc5f193adbdf15
parent55c89972efa8e854f519fc7d2385fac03e42c395 (diff)
downloadrt.equinox.bundles-cabcba5739836ed32db50f590282069e14b21182.zip
rt.equinox.bundles-cabcba5739836ed32db50f590282069e14b21182.tar.gz
rt.equinox.bundles-cabcba5739836ed32db50f590282069e14b21182.tar.bz2
Made participantToCoordination a synchronized map. This protected against concurrent access between addParticipant and terminate.
-rw-r--r--bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java
index 94a997a..ed3ebe3 100644
--- a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java
+++ b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java
@@ -13,6 +13,7 @@ package org.eclipse.equinox.coordinator;
import java.security.Permission;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.IdentityHashMap;
@@ -45,7 +46,7 @@ public class CoordinatorImpl implements Coordinator {
// Coordination IDs must be unique across all using bundles.
private static final Map<Long, CoordinationImpl> idToCoordination = new HashMap<Long, CoordinationImpl>();
// Coordination participation must be tracked across all using bundles.
- private static final Map<Participant, CoordinationImpl> participantToCoordination = new IdentityHashMap<Participant, CoordinationImpl>();
+ private static final Map<Participant, CoordinationImpl> participantToCoordination = Collections.synchronizedMap(new IdentityHashMap<Participant, CoordinationImpl>());
private static ThreadLocal<WeakCoordinationStack> coordinationStack = new ThreadLocal<WeakCoordinationStack>() {
@Override