[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Question about precedence between boolean operators

I think && should be higher priority and you have found a bug.

Andy

On 5 July 2010 19:32, Fabiano Ferrari <fcferrari.listas@xxxxxxxxx> wrote:
>
> Hi, all.
>
> I was wondering how ajc handles the precedence order of boolean operators in
> pointcut expressions. Do "AND" (&&) and "OR" (||) operators have the same
> precedence? In the example below, extracted from Laddad's AspectJ in Action
> book, the original expression compiles with no errors, while the modified
> version results in "multiple bindings" errors (the full aspect code is
> attached). That means "AND" and "OR" have the same precedence, right?
>
> Original pointcut expression:
>
>     pointcut accountActivity(Account account, float amount)    :
>    ( (execution(void Account.credit(float)) || execution(void
> Account.debit(float))) && this(account) && args(amount) )
>    ||
>    ( execution(void CheckClearanceSystem.*(Account, float)) && args(account,
> amount) );
>
>
> Modified pointcut expression:
>
>   pointcut accountActivity (Account account, float amount) :
>    (execution(void Account.credit(float)) || execution(void
> Account.debit(float))) && this(account) && args(amount)
>    ||
>    execution(void CheckClearanceSystem.*(Account, float)) && args(account,
> amount);
>
>
> Cheers,
>
>   Fabiano Ferrari.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>