aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-14 08:17:53 +0000
committeraclement <aclement>2005-10-14 08:17:53 +0000
commit4aad0473b4681fab8e2f73515c48fc30943fc847 (patch)
tree03d1b25fbc09304dd085aaa4c37211715a036fc5 /weaver
parent8982544f13eb5cb082ca19db2bd2c5f77b1e5965 (diff)
downloadaspectj-4aad0473b4681fab8e2f73515c48fc30943fc847.tar.gz
aspectj-4aad0473b4681fab8e2f73515c48fc30943fc847.zip
pr112529: better diagnostics (I think it'll still fail tho...)
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index ae688a5ff..1e826d6b4 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -60,6 +60,7 @@ import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AnnotationOnTypeMunger;
import org.aspectj.weaver.AnnotationX;
import org.aspectj.weaver.AsmRelationshipProvider;
+import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ConcreteTypeMunger;
import org.aspectj.weaver.CrosscuttingMembersSet;
import org.aspectj.weaver.IClassFileProvider;
@@ -1011,8 +1012,12 @@ public class BcelWeaver implements IWeaver {
for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {
UnwovenClassFile classFile = (UnwovenClassFile)i.next();
String className = classFile.getClassName();
- BcelObjectType classType = BcelWorld.getBcelObjectType(world.resolve(className));
- if (classType.isAspect()) {
+ ResolvedType theType = world.resolve(className);
+ if (theType.isAspect()) {
+ BcelObjectType classType = BcelWorld.getBcelObjectType(theType);
+ if (classType==null) {
+ throw new BCException("Can't find bcel delegate for "+className);
+ }
weaveAndNotify(classFile, classType,requestor);
wovenClassNames.add(className);
}
@@ -1025,8 +1030,12 @@ public class BcelWeaver implements IWeaver {
for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {
UnwovenClassFile classFile = (UnwovenClassFile)i.next();
String className = classFile.getClassName();
- BcelObjectType classType = BcelWorld.getBcelObjectType(world.resolve(className));
- if (! classType.isAspect()) {
+ ResolvedType theType = world.resolve(className);
+ if (!theType.isAspect()) {
+ BcelObjectType classType = BcelWorld.getBcelObjectType(theType);
+ if (classType==null) {
+ throw new BCException("Can't find bcel delegate for "+className);
+ }
weaveAndNotify(classFile, classType, requestor);
wovenClassNames.add(className);
}