Community
Participate
Working Groups
In "!if(expression)" the negation part is ignored. I am using beta4. How to reproduce: public class Test { public static void main(String args[]) { } } aspect NotIfBugAspect { before() : execution(* main(..)) && !if(true) { System.out.println("NotIfBugAspect message"); } } > ajc *.java > java Test NotIfBugAspect message If I change the pointcut in before advice to move negation inside if(), everything works fine: aspect NotIfBugAspect { before() : execution(* main(..)) && if(!true) { System.out.println("NotIfBugAspect message"); } } > ajc *.java > java Test <no output>
fixed in tree, test in bugs/NotIf.java This bug was caused by a previous fix for handling the interaction between args and if pcd's. This interaction is much messier than it should be and is a prime opportunity for a better design.