Bug 319190 - operator precedence messed up in some pointcuts
Summary: operator precedence messed up in some pointcuts
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.9   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: 1.6.10   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-07 16:31 EDT by Andrew Clement CLA
Modified: 2010-07-07 17:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2010-07-07 16:31:29 EDT
Some pointcuts are not quite parsed correctly and give the impression that && and || have the same precedence.  Example:

(execution(* A.credit(float)) || execution(* A.debit(float))) && this(acc) && args(am)  || execution(* C.*(Account, float)) && args(acc, am)
Comment 1 Andrew Clement CLA 2010-07-07 16:33:10 EDT
Simple pointcuts don't trigger this problem, it has to be a particular kind of pointcut.  For example, this parses fine (with && higher precedence):

"if(true) && if(false) || if(true)"

It looks to be a simple pointcut parser problem where it shouldn't be considering || adjoined clauses whilst processing a series of &&.
Comment 2 Andrew Clement CLA 2010-07-07 17:02:12 EDT
fixed