Browse Source

269867: synchronized the map

tags/V1_6_4
aclement 15 years ago
parent
commit
752f895d26
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java

+ 3
- 1
aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java View File

@@ -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.

Loading…
Cancel
Save