diff options
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/Aj.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java index 0d17dfdec..1c03f1496 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java @@ -74,13 +74,15 @@ public class Aj implements ClassPreProcessor { private static Map weavingAdaptors = new WeakHashMap(); static WeavingAdaptor getWeaver(ClassLoader loader) { - synchronized (weavingAdaptors) { - WeavingAdaptor weavingAdaptor = (WeavingAdaptor) weavingAdaptors.get(loader); - if (weavingAdaptor == null) { - weavingAdaptor = new ClassLoaderWeavingAdaptor(loader); - weavingAdaptors.put(loader, weavingAdaptor); + synchronized(loader) {//FIXME AV - temp fix for #99861 + synchronized (weavingAdaptors) { + WeavingAdaptor weavingAdaptor = (WeavingAdaptor) weavingAdaptors.get(loader); + if (weavingAdaptor == null) { + weavingAdaptor = new ClassLoaderWeavingAdaptor(loader); + weavingAdaptors.put(loader, weavingAdaptor); + } + return weavingAdaptor; } - return weavingAdaptor; } } } |