aboutsummaryrefslogtreecommitdiffstats
path: root/loadtime
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2013-10-01 10:08:31 -0700
committerAndy Clement <aclement@gopivotal.com>2013-10-18 11:36:38 -0700
commitf68fad1168cb96b6dd5402b4778a25e8b4d0acab (patch)
tree60333edbee0984435b1d0d2becf947f2a0a75c25 /loadtime
parent2314eaf48a35a249e63fae12151ce926ea98c97c (diff)
downloadaspectj-f68fad1168cb96b6dd5402b4778a25e8b4d0acab.tar.gz
aspectj-f68fad1168cb96b6dd5402b4778a25e8b4d0acab.zip
415266: ltw jmx fix
Diffstat (limited to 'loadtime')
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/Aj.java18
1 files changed, 8 insertions, 10 deletions
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;
}