diff options
author | aclement <aclement> | 2005-11-11 18:10:09 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-11 18:10:09 +0000 |
commit | b1d058921b7d8bc44035bbb2c2b38627c09eedbe (patch) | |
tree | b525a175bce6cc1018b6ab6051d4dde2ca9287c4 /weaver | |
parent | d7d5947ddd5a3b4f5c3bcaed6114b5445f0d6a01 (diff) | |
download | aspectj-b1d058921b7d8bc44035bbb2c2b38627c09eedbe.tar.gz aspectj-b1d058921b7d8bc44035bbb2c2b38627c09eedbe.zip |
fix for pr113531
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index d85743bb0..4754164f9 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -67,6 +67,8 @@ import org.aspectj.weaver.IClassFileProvider; import org.aspectj.weaver.IWeaveRequestor; import org.aspectj.weaver.IWeaver; import org.aspectj.weaver.NewParentTypeMunger; +import org.aspectj.weaver.ReferenceType; +import org.aspectj.weaver.ReferenceTypeDelegate; import org.aspectj.weaver.ResolvedTypeMunger; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.ShadowMunger; @@ -980,7 +982,7 @@ public class BcelWeaver implements IWeaver { if (theType.isAnnotationStyleAspect()) { BcelObjectType classType = BcelWorld.getBcelObjectType(theType); if (classType==null) { - throw new BCException("Can't find bcel delegate for "+className+" type="+theType.getClass()); + throw new BCException("Can't find bcel delegate for "+className+" type="+theType.getClass()); } LazyClassGen clazz = classType.getLazyClassGen(); BcelPerClauseAspectAdder selfMunger = new BcelPerClauseAspectAdder(theType, theType.getPerClause().getKind()); @@ -1053,8 +1055,16 @@ public class BcelWeaver implements IWeaver { String className = classFile.getClassName(); ResolvedType theType = world.resolve(className); if (theType.isAspect()) { - BcelObjectType classType = BcelWorld.getBcelObjectType(theType); + BcelObjectType classType = BcelWorld.getBcelObjectType(theType); if (classType==null) { + + // Sometimes.. if the Bcel Delegate couldn't be found then a problem occurred at compile time - on + // a previous compiler run. In this case I assert the delegate will still be an EclipseSourceType + // and we can ignore the problem here (the original compile error will be reported again from + // the eclipse source type) - pr113531 + ReferenceTypeDelegate theDelegate = ((ReferenceType)theType).getDelegate(); + if (theDelegate.getClass().getSimpleName().equals("EclipseSourceType")) continue; + throw new BCException("Can't find bcel delegate for "+className+" type="+theType.getClass()); } weaveAndNotify(classFile, classType,requestor); |