Closed aclement closed 2 years ago
Quite surprised by this. This aspect works as expected:
@Aspect class Azpect { @Pointcut("bar()") public static void foo() {} @Pointcut("if()") public static boolean bar() { return true; } @Before("foo() && execution(* E.run(..))") public void beforeAdvice() { System.out.println("advice running"); } }
Inverting the if() return value and switching it to !bar():
@Aspect class Azpect { @Pointcut("!bar()") public static void foo() {} @Pointcut("if()") public static boolean bar() { return false; } @Before("foo() && execution(* E.run(..))") public void beforeAdvice() { System.out.println("advice running"); } }
and it doesn't work any more.
Quite surprised by this. This aspect works as expected:
Inverting the if() return value and switching it to !bar():
and it doesn't work any more.