diff options
author | Andy Clement <aclement@pivotal.io> | 2019-06-03 10:06:59 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-06-03 10:06:59 -0700 |
commit | ff7f5a5441d4e2e8744a10c8f7c733fa208e0b89 (patch) | |
tree | 5334238d7461c41d869365232bcbded6a7a9f159 /tests/bugs195 | |
parent | 01f7d8ba8e3ff34ffacb95ae25787b0f0ce9f1d8 (diff) | |
download | aspectj-ff7f5a5441d4e2e8744a10c8f7c733fa208e0b89.tar.gz aspectj-ff7f5a5441d4e2e8744a10c8f7c733fa208e0b89.zip |
Fix 547808: npe regression for multi @Around
Diffstat (limited to 'tests/bugs195')
-rw-r--r-- | tests/bugs195/333274/Code.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs195/333274/Code.java b/tests/bugs195/333274/Code.java new file mode 100644 index 000000000..d456c0a05 --- /dev/null +++ b/tests/bugs195/333274/Code.java @@ -0,0 +1,39 @@ +import org.aspectj.lang.annotation.*; +import org.aspectj.lang.*; + +public class Code { + public static void main(String []argv) { +try { + foo(); +} catch (Throwable t) { + System.out.println("Caught "+t); +} + } + + public static void foo() { + print1("abc"); + print2("def"); + print1("ghi"); + } + + public static void print1(String s) { + System.out.println(s); + } + + public static void print2(String s) { + System.out.println(s); + } +} + +@Aspect +class Azpect { + @Around("call(* print2(..))") + public Object one(ProceedingJoinPoint pjp) { + return pjp.proceed(); + } + @Around("call(* print2(..))") + public Object two(ProceedingJoinPoint pjp) { + //return pjp.proceed(); + throw new IllegalStateException(""); + } +} |