]> source.dussan.org Git - aspectj.git/commitdiff
255856: test and fix: dont incorrectly process @target(Blah)+
authoraclement <aclement>
Mon, 8 Dec 2008 20:42:55 +0000 (20:42 +0000)
committeraclement <aclement>
Mon, 8 Dec 2008 20:42:55 +0000 (20:42 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java

index 91c395823600f5cb6b53d3eeb98d0dcd3f84a317..8f1f624c10c72699242cb8189475d22d5ed9826f 100644 (file)
@@ -376,7 +376,9 @@ public class ValidateAtAspectJAnnotationsVisitor extends ASTVisitor {
                        pointcutExpression = getStringLiteralFor("value", adviceAnn, pcLocation);
                try {
                        ISourceContext context = new EclipseSourceContext(unit.compilationResult, pcLocation[0]);
-                       Pointcut pc = new PatternParser(pointcutExpression, context).parsePointcut();
+                       PatternParser pp = new PatternParser(pointcutExpression, context);
+                       Pointcut pc = pp.parsePointcut();
+                       pp.checkEof();
                        FormalBinding[] bindings = buildFormalAdviceBindingsFrom(methodDeclaration);
                        pc.resolve(new EclipseScope(bindings, methodDeclaration.scope));
                        EclipseFactory factory = EclipseFactory.fromScopeLookupEnvironment(methodDeclaration.scope);