diff options
author | aclement <aclement> | 2006-02-16 09:04:45 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-02-16 09:04:45 +0000 |
commit | 15930e7f92e2d4be1866509a8550373a4bcea978 (patch) | |
tree | 21994c37092e9f5ba2845367110578b4bd8f777a /weaver/src | |
parent | 2c55408317cf3c54c20d3aced2d122d7061f1a99 (diff) | |
download | aspectj-15930e7f92e2d4be1866509a8550373a4bcea978.tar.gz aspectj-15930e7f92e2d4be1866509a8550373a4bcea978.zip |
tests and (slightly reworked) fix for 125699 from Helen. @AJ bug with inherited advice from code style aspects.
Diffstat (limited to 'weaver/src')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index db4caee5a..118e7bfee 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -502,9 +502,12 @@ public class BcelWeaver implements IWeaver { if (advice.getSignature() != null) { final int numFormals; final String names[]; - //ATAJ for @AJ aspect, the formal have to be checked according to the argument number - // since xxxJoinPoint presence or not have side effects - if (advice.getConcreteAspect().isAnnotationStyleAspect()) { + // If the advice is being concretized in a @AJ aspect *and* the advice was declared in + // an @AJ aspect (it could have been inherited from a code style aspect) then + // evaluate the alternative set of formals. pr125699 + if (advice.getConcreteAspect().isAnnotationStyleAspect() + && advice.getDeclaringAspect()!=null + && advice.getDeclaringAspect().resolve(world).isAnnotationStyleAspect()) { numFormals = advice.getBaseParameterCount(); int numArgs = advice.getSignature().getParameterTypes().length; if (numFormals > 0) { |