From: aclement Date: Tue, 31 May 2011 22:09:48 +0000 (+0000) Subject: pass formal name through X-Git-Tag: V1_6_12M1~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a98d17d36ad7667c9f5c65dc65c62a572b040e17;p=aspectj.git pass formal name through --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java index 261e3a481..44b346e60 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java @@ -198,10 +198,12 @@ public class AnnotationPointcut extends NameBindingPointcut { protected Test findResidueInternal(Shadow shadow, ExposedState state) { if (annotationTypePattern instanceof BindingAnnotationFieldTypePattern) { if (shadow.getKind() != Shadow.MethodExecution) { - shadow.getIWorld().getMessageHandler().handleMessage( - MessageUtil.error( - "Annotation field binding is only supported at method-execution join points (compiler limitation)", - getSourceLocation())); + shadow.getIWorld() + .getMessageHandler() + .handleMessage( + MessageUtil + .error("Annotation field binding is only supported at method-execution join points (compiler limitation)", + getSourceLocation())); return Literal.TRUE; // exit quickly, error will prevent weaving } BindingAnnotationFieldTypePattern btp = (BindingAnnotationFieldTypePattern) annotationTypePattern; @@ -213,7 +215,7 @@ public class AnnotationPointcut extends NameBindingPointcut { if (var == null) { throw new BCException("Unexpected problem locating annotation at join point '" + shadow + "'"); } - state.set(btp.getFormalIndex(), var.getAccessorForValue(formalType)); + state.set(btp.getFormalIndex(), var.getAccessorForValue(formalType, btp.formalName)); } else if (annotationTypePattern instanceof BindingAnnotationTypePattern) { BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern) annotationTypePattern; UnresolvedType annotationType = btp.getAnnotationType();