Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] overlapping pointcuts and a compiler bug

Hi,
I am building a tool for runtime verification using AspectJ and I am exploring the precedence between two pointcuts as follows: pointcut one(): (execution (* *.*())); pointcut two(): (execution (* *.atest())); ...ideally I would like to know how many pointcuts are triggered for a single joinpoint so that I can process them "concurrently" and decide the priority dynamically...

However, the AspectJ compiler returned the following exception:

java.lang.NullPointerException
at org.aspectj.weaver.ReferenceType.isAspect(ReferenceType.java:159)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager$4.addAspectName(AjBuildManager.java:1100)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager$4.acceptResult(AjBuildManager.java:1039)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.acceptResult(AjPipeliningCompilerAdapter.java:405)
at org.aspectj.ajdt.intern ... lugin$7.run(DebugUIPlugin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Compile error: NullPointerException thrown: null

The CODE:

    pointcut one(): (execution (* *.*()));
   
    pointcut two(): (execution (* *.atest()));
   
    before():one()
    {
        System.out.println("Before One");
    }
   
    after():one()
    {
        System.out.println("After One");
    }
   
    before():two()
    {
        System.out.println("Before Two");
    }
   
    after():two()
    {
        System.out.println("After Two");
    }


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Back to the top