From: Andy Clement Date: Tue, 1 Oct 2013 17:08:31 +0000 (-0700) Subject: 415266: ltw jmx fix X-Git-Tag: V1_8_0RC1~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f68fad1168cb96b6dd5402b4778a25e8b4d0acab;p=aspectj.git 415266: ltw jmx fix --- diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java index 42d7a258b..03715b6a3 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java @@ -297,10 +297,9 @@ public class Aj implements ClassPreProcessor { synchronized (weavingAdaptors) { checkQ(); - if(loader.equals(myClassLoader)){ - adaptor = myClassLoaderAdpator; - } - else{ + if (loader.equals(myClassLoader)){ + adaptor = myClassLoaderAdaptor; + } else { adaptor = (ExplicitlyInitializedClassLoaderWeavingAdaptor) weavingAdaptors.get(adaptorKey); } if (adaptor == null) { @@ -308,12 +307,11 @@ public class Aj implements ClassPreProcessor { // within the synchronized block ClassLoaderWeavingAdaptor weavingAdaptor = new ClassLoaderWeavingAdaptor(); adaptor = new ExplicitlyInitializedClassLoaderWeavingAdaptor(weavingAdaptor); - if(myClassLoaderAdpator == null){ - myClassLoaderAdpator = adaptor; - } - else{ + if(myClassLoaderAdaptor == null && loader.equals(myClassLoader)){ + myClassLoaderAdaptor = adaptor; + } else { weavingAdaptors.put(adaptorKey, adaptor); - } + } } } // perform the initialization @@ -322,7 +320,7 @@ public class Aj implements ClassPreProcessor { } private static final ClassLoader myClassLoader = WeavingAdaptor.class.getClassLoader(); - private static ExplicitlyInitializedClassLoaderWeavingAdaptor myClassLoaderAdpator; + private static ExplicitlyInitializedClassLoaderWeavingAdaptor myClassLoaderAdaptor; }