diff options
author | Andy Clement <aclement@pivotal.io> | 2022-01-31 15:47:27 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2022-01-31 15:47:27 -0800 |
commit | fab59b5d20ee3ad5d49920c4e9fe785f58820614 (patch) | |
tree | 3b4f99e0e11032b820fd4a197833f0ef215a31db /tests/bugs198/github_122/E.java | |
parent | f1cb850e40b98dadfcaf0c6ea27531399a307529 (diff) | |
download | aspectj-fab59b5d20ee3ad5d49920c4e9fe785f58820614.tar.gz aspectj-fab59b5d20ee3ad5d49920c4e9fe785f58820614.zip |
Improve annotation style if pointcut handling
This fixes:
- negating annotation style if() pointcuts doesn't work
- annotation style if() pointcut not able to use a binding
that is not exposed
Fixes #120,#122
Diffstat (limited to 'tests/bugs198/github_122/E.java')
-rw-r--r-- | tests/bugs198/github_122/E.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/bugs198/github_122/E.java b/tests/bugs198/github_122/E.java new file mode 100644 index 000000000..29c818285 --- /dev/null +++ b/tests/bugs198/github_122/E.java @@ -0,0 +1,30 @@ +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; + +/** + * Test !if() pointcuts + */ +public class E { + + public static void main(String []argv) { + new E().run(); + } + + public void run() { + System.out.println("E.run() executing"); + } + +} + +@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"); + } +}
\ No newline at end of file |