From: Andy Clement Date: Tue, 1 Oct 2013 17:08:31 +0000 (-0700) Subject: 415266: ltw jmx fix X-Git-Tag: V1_7_4~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9e992d6e5e2809afdc18ee4ce4e3bc42b9883e00;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; }