summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravasseur <avasseur>2005-07-11 15:09:52 +0000
committeravasseur <avasseur>2005-07-11 15:09:52 +0000
commitaff35a1175201aab88a2f79bb4e13ca67eff125c (patch)
tree1b03aa76de87a807d6a640085efd52f3ee5a0279
parent639b4fd0a436e19726dc9f2a47dc66a726794b3d (diff)
downloadaspectj-aff35a1175201aab88a2f79bb4e13ca67eff125c.tar.gz
aspectj-aff35a1175201aab88a2f79bb4e13ca67eff125c.zip
99861 temp fix for deadlock when Sun' Unsafe.defineClass API is used (deadlock in JVMTI obviously, not tied to AJ, but bothers Ron)
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/Aj.java14
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;
}
}
}