Bug 305635

Summary: BasicTokenSource.java:84 NullPointerException
Product: [Tools] AspectJ Reporter: jcarmas
Component: IDEAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description jcarmas CLA 2010-03-11 23:52:30 EST
Build Identifier:  20100218-160

I´m defining an aspect as 
    @AfterReturning(pointcut=INTERNAL_EXECUTION,returning="response")
 
being 

protected static final String INTERNAL_EXECUTION=
"execution" + "(* " + FACADE_EJB + ".internalRetrieve(..))" + " && args(ticket, ..)";

and being FACADE_EJB just a constant refering to the class name.

It generates

java.lang.NullPointerException
at org.aspectj.weaver.patterns.BasicTokenSource.makeTokenSource(BasicTokenSource.java:84)
at org.aspectj.weaver.patterns.PatternParser.<init>(PatternParser.java:1658)
at org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.resolveAndSetPointcut(ValidateAtAspectJAnnotationsVisitor.java:388)
at org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.validateAdvice(Vali ... oBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Compile error: NullPointerException thrown: null

Reproducible: Always

Steps to Reproduce:
1.Define some final string with the detail of your pointcut
2.Declare an Aspect an include @AfterReturning
3.Include a returning modifier