summaryrefslogtreecommitdiffstats
path: root/loadtime/src
diff options
context:
space:
mode:
authormwebster <mwebster>2006-06-01 16:30:21 +0000
committermwebster <mwebster>2006-06-01 16:30:21 +0000
commit4513e921c89fb3b8f037418a901e49906724e7bd (patch)
tree8c97c62a5d57f1041326b8e37beb80c59f65f8b9 /loadtime/src
parenta5b31830511167ea4a8b9d750c7e1d16292e0938 (diff)
downloadaspectj-4513e921c89fb3b8f037418a901e49906724e7bd.tar.gz
aspectj-4513e921c89fb3b8f037418a901e49906724e7bd.zip
fix for 120739
Diffstat (limited to 'loadtime/src')
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
index 1cff6f265..35277ba4d 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
@@ -122,11 +122,17 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
// register the definitions
registerDefinitions(weaver, loader, definitions);
+ if (enabled) {
- //bcelWorld.setResolutionLoader(loader.getParent());//(ClassLoader)null);//
-
- // after adding aspects
- weaver.prepareForWeave();
+ //bcelWorld.setResolutionLoader(loader.getParent());//(ClassLoader)null);//
+
+ // after adding aspects
+ weaver.prepareForWeave();
+ }
+ else {
+ bcelWorld = null;
+ weaver = null;
+ }
}
/**
@@ -368,6 +374,12 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
}
}
}
+
+ /* We didn't register any aspects so disable the adaptor */
+ if (namespace == null) {
+ enabled = false;
+ info("no aspects registered. Disabling weaver for class loader " + getClassLoaderName(loader));
+ }
}
/**