diff options
author | aclement <aclement> | 2009-01-16 22:41:12 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-01-16 22:41:12 +0000 |
commit | 25277e5bdd3116dff98b72336e2511367146b794 (patch) | |
tree | 5c3aafb04b4e512ce352b1d4a1964ae4b4150a70 /bridge/src | |
parent | 29fe23e4bb449eea40dcf3ec78cd59a73088104d (diff) | |
download | aspectj-25277e5bdd3116dff98b72336e2511367146b794.tar.gz aspectj-25277e5bdd3116dff98b72336e2511367146b794.zip |
prevent multi-threaded access problems to the map
Diffstat (limited to 'bridge/src')
-rw-r--r-- | bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java b/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java index 90dbad5e2..1df076b11 100644 --- a/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java +++ b/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java @@ -12,6 +12,7 @@ package org.aspectj.bridge.context; import java.lang.ref.WeakReference; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -88,7 +89,7 @@ public class CompilationAndWeavingContext { "type munging for @AspectJ aspectOf" }; // context stacks, one per thread - private static Map contextMap = new HashMap(); + private static Map contextMap = Collections.synchronizedMap(new HashMap()); // single thread mode stack private static Stack contextStack = new Stack(); |