diff options
author | aclement <aclement> | 2007-02-27 13:31:32 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-02-27 13:31:32 +0000 |
commit | 712178b936edd32f5aaa0f06ac225fd2bab13379 (patch) | |
tree | 577e01033e0a6624dd42b7ea714a0646f56bdc7e /weaver | |
parent | e253331f1e8d3f4aaba29f73fada1cdd1f72a314 (diff) | |
download | aspectj-712178b936edd32f5aaa0f06ac225fd2bab13379.tar.gz aspectj-712178b936edd32f5aaa0f06ac225fd2bab13379.zip |
174449: generic aspects and generic pointcuts - dont ignore parameterized signatures for the advice method
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelShadow.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index edc49f78b..883f04a54 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -2386,7 +2386,17 @@ public class BcelShadow extends Shadow { extraParamOffset += thisJoinPointVar.getType().getSize(); } - Type[] adviceParameterTypes = adviceMethod.getArgumentTypes(); + // We use the munger signature here because it allows for any parameterization of the mungers pointcut that + // may have occurred ie. if the pointcut is p(T t) in the super aspect and that has become p(Foo t) in the sub aspect + // then here the munger signature will have 'Foo' as an argument in it whilst the adviceMethod argument type will be 'Object' - since + // it represents the advice method in the superaspect which uses the erasure of the type variable p(Object t) - see pr174449. + + Type[] adviceParameterTypes = + BcelWorld.makeBcelTypes(munger.getSignature().getParameterTypes()); +// adviceMethod.getArgumentTypes(); + adviceMethod.getArgumentTypes(); // forces initialization ... dont like this but seems to be required for some tests to pass, I think that means + // there is a LazyMethodGen method that is not correctly setup to call initialize() when it is invoked - but I dont have + // time right now to discover which Type[] extractedMethodParameterTypes = extractedMethod.getArgumentTypes(); Type[] parameterTypes = new Type[extractedMethodParameterTypes.length |