Skip to main content

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

I restarted eclipse and everything worked fine...

however i still have this question:
 
if i have the following two advises:

before(): (execution (* *.*())){} before(): (execution (* *.atest())){}

can i somehow decide their precedence during runtime?


----- Original Message ----
From: Andy Clement <andrew.clement@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Sent: Tuesday, April 1, 2008 7:51:21 AM
Subject: Re: [aspectj-users] overlapping pointcuts and a compiler bug

Any npe is a compiler bug - please open a bug report for it

Andy.

On 28/03/2008, chris colombo <chriscol002@xxxxxxxxx> wrote:
>
> 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.
> _______________________________________________
>  aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.

Back to the top