aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2008-03-18 21:00:01 +0000
committeraclement <aclement>2008-03-18 21:00:01 +0000
commite95bd7610b7da1aae7aa6fc309f78bca3d76ce85 (patch)
tree88724b71a90dc7ed247596429c81c61df1f83b41 /weaver
parent31faca3733d21214b8672766ef65ec0e4384bfba (diff)
downloadaspectj-e95bd7610b7da1aae7aa6fc309f78bca3d76ce85.tar.gz
aspectj-e95bd7610b7da1aae7aa6fc309f78bca3d76ce85.zip
223094 - fix, add supertypes automatically if they are aspects when ltw
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index 6df284107..62c53629c 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -71,8 +71,8 @@ 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.ResolvedTypeMunger;
import org.aspectj.weaver.Shadow;
import org.aspectj.weaver.ShadowMunger;
import org.aspectj.weaver.UnresolvedType;
@@ -201,6 +201,14 @@ public class BcelWeaver implements IWeaver {
//=> mainly for nothing for LTW - pbly for something in incremental build...
xcutSet.addOrReplaceAspect(type);
if (trace.isTraceEnabled()) trace.exit("addLibraryAspect",type);
+ if (type.getSuperclass().isAspect()) {
+ // If the supertype includes ITDs and the user has not included that aspect in the aop.xml, they will
+ // not get picked up, which can give unusual behaviour! See bug 223094
+ // This change causes us to pick up the super aspect regardless of what was said in the aop.xml - giving
+ // predictable behaviour. If the user also supplied it, there will be no problem other than the second
+ // addition overriding the first
+ addLibraryAspect(type.getSuperclass().getName());
+ }
return type;
} else {
// FIXME AV - better warning upon no such aspect from aop.xml