diff options
author | aclement <aclement> | 2005-04-20 14:32:40 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-04-20 14:32:40 +0000 |
commit | 3f942a4c58210535e91c50a037a8d743a0c70e19 (patch) | |
tree | cecc507db4a72d422a40089d1664a77c2f1dd075 /weaver | |
parent | 78abc76610cfb5fd2a2282086adfb017537ce49c (diff) | |
download | aspectj-3f942a4c58210535e91c50a037a8d743a0c70e19.tar.gz aspectj-3f942a4c58210535e91c50a037a8d743a0c70e19.zip |
Fix for pr92053: atargs causes a VerifyError: Unable to pop operand off an empty stack
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java index dfb97e743..ce9125476 100644 --- a/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/ArgsAnnotationPointcut.java @@ -137,24 +137,18 @@ public class ArgsAnnotationPointcut extends NameBindingPointcut { WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_ARG_TYPE,argType.getName()), "",IMessage.ERROR,shadow.getSourceLocation(),null,new ISourceLocation[]{getSourceLocation()}); } - if (ap.matches(rArgType).alwaysTrue()) { // !!! ASC Can we ever take this branch? - // !!! AMC - Yes, if annotation is @Inherited - argsIndex++; - continue; - } else { + + ResolvedTypeX rAnnType = ap.annotationType.resolve(shadow.getIWorld()); + if (ap instanceof BindingAnnotationTypePattern) { + BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern)ap; + Var annvar = shadow.getArgAnnotationVar(argsIndex,rAnnType); + state.set(btp.getFormalIndex(),annvar); + } + if (!ap.matches(rArgType).alwaysTrue()) { // we need a test... - ResolvedTypeX rAnnType = ap.annotationType.resolve(shadow.getIWorld()); - if (ap instanceof BindingAnnotationTypePattern) { - BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern)ap; - Var annvar = shadow.getArgAnnotationVar(argsIndex,rAnnType); - state.set(btp.getFormalIndex(),annvar); - ret = Test.makeAnd(ret,Test.makeHasAnnotation(shadow.getArgVar(argsIndex),rAnnType)); - argsIndex++; - } else { - ret = Test.makeAnd(ret,Test.makeHasAnnotation(shadow.getArgVar(argsIndex),rAnnType)); - argsIndex++; - } - } + ret = Test.makeAnd(ret,Test.makeHasAnnotation(shadow.getArgVar(argsIndex),rAnnType)); + } + argsIndex++; } } return ret; |