aboutsummaryrefslogtreecommitdiffstats
path: root/aspectj5rt
diff options
context:
space:
mode:
authoraclement <aclement>2009-03-24 22:04:41 +0000
committeraclement <aclement>2009-03-24 22:04:41 +0000
commit752f895d260e3c61c8140a90812df52425ca3692 (patch)
treecb37d08c42322c62674e2505a1945d3c5e4386e0 /aspectj5rt
parent3eb475ccd3fcd641ef0aa6c543314ec0a26f5fe4 (diff)
downloadaspectj-752f895d260e3c61c8140a90812df52425ca3692.tar.gz
aspectj-752f895d260e3c61c8140a90812df52425ca3692.zip
269867: synchronized the map
Diffstat (limited to 'aspectj5rt')
-rw-r--r--aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java b/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java
index 5ac17e26f..6999dac19 100644
--- a/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java
+++ b/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java
@@ -12,6 +12,7 @@
package org.aspectj.lang.reflect;
import java.lang.ref.WeakReference;
+import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;
@@ -24,7 +25,8 @@ import org.aspectj.internal.lang.reflect.AjTypeImpl;
*/
public class AjTypeSystem {
- private static Map<Class, WeakReference<AjType>> ajTypes = new WeakHashMap<Class,WeakReference<AjType>>();
+ private static Map<Class, WeakReference<AjType>> ajTypes =
+ Collections.synchronizedMap(new WeakHashMap<Class,WeakReference<AjType>>());
/**
* Return the AspectJ runtime type representation of the given Java type.