From 752f895d260e3c61c8140a90812df52425ca3692 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 24 Mar 2009 22:04:41 +0000 Subject: 269867: synchronized the map --- aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'aspectj5rt/java5-src') 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> ajTypes = new WeakHashMap>(); + private static Map> ajTypes = + Collections.synchronizedMap(new WeakHashMap>()); /** * Return the AspectJ runtime type representation of the given Java type. -- cgit v1.2.3