I think && should be higher priority and you have found a bug. Andy
On 5 July 2010 19:32, Fabiano Ferrari <[email protected]> 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 > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
