[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Question about precedence between boolean operators
|
- From: Andy Clement <andrew.clement@xxxxxxxxx>
- Date: Wed, 7 Jul 2010 13:03:39 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=IKzeBargsz+hZoYlQ9ky2ZCuAflsZHQ8gqkc5BzCrA4=; b=ppMjPaj3740c4C550eqs6VnwrPZoWTax6xRblmDrML1DkZJp4phHTqgS0wUNSNt17Y aPqmhDMx/UFVu1XI2jGmGph473hS/lCYLrc1q9BrMxC5Zr3KzzFRAdXXitXGptr0yBcR 5iKUqRrSj1vZqP63A1cXjkjZQXgAevOKnaF9I=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kzSjXUmlyIYl7l5fhHEcdazTpCA/WQF6yCYIuF3cdtHMGjsjKUC6OCq4YIdwqOMWEs uGuJwhh2TYrmFLyVUN+oVWfXukJJz7sloN1HUGizMg/1cys0/DhzLgfzIHu3tgNN6sgz 5kgHYxVkvhOyypQ9GgeMPb/OA0iarr9XDarE0=
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
>
>