diff options
author | aclement <aclement> | 2008-07-30 16:39:51 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-07-30 16:39:51 +0000 |
commit | 58185caad5b483c85ec870a759dc777ab23f33f7 (patch) | |
tree | d773c3a620758ad47bf7317ba8affd8b2bd7c9a0 /tests/bugs162 | |
parent | e9823aa074ffa69352ffcab1ef6be2b00d5accf1 (diff) | |
download | aspectj-58185caad5b483c85ec870a759dc777ab23f33f7.tar.gz aspectj-58185caad5b483c85ec870a759dc777ab23f33f7.zip |
241847: test added, commented out
Diffstat (limited to 'tests/bugs162')
-rw-r--r-- | tests/bugs162/pr241847/Ann.java | 8 | ||||
-rw-r--r-- | tests/bugs162/pr241847/Asp.aj | 9 | ||||
-rw-r--r-- | tests/bugs162/pr241847/CC.java | 15 | ||||
-rw-r--r-- | tests/bugs162/pr241847/II.java | 4 | ||||
-rw-r--r-- | tests/bugs162/pr241847/LongLong.java | 14 |
5 files changed, 50 insertions, 0 deletions
diff --git a/tests/bugs162/pr241847/Ann.java b/tests/bugs162/pr241847/Ann.java new file mode 100644 index 000000000..689d934e0 --- /dev/null +++ b/tests/bugs162/pr241847/Ann.java @@ -0,0 +1,8 @@ +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + + +@Retention(RetentionPolicy.RUNTIME) +public @interface Ann { + +} diff --git a/tests/bugs162/pr241847/Asp.aj b/tests/bugs162/pr241847/Asp.aj new file mode 100644 index 000000000..9df7b7f7c --- /dev/null +++ b/tests/bugs162/pr241847/Asp.aj @@ -0,0 +1,9 @@ +import java.util.Arrays; + + +public aspect Asp { + before() : execution(* *(@Ann (*), ..)) { + //System.out.println(thisJoinPoint.getSignature().toShortString() + ' ' + Arrays.asList(thisJoinPoint.getArgs())); + throw new RuntimeException("expected exception"); + } +} diff --git a/tests/bugs162/pr241847/CC.java b/tests/bugs162/pr241847/CC.java new file mode 100644 index 000000000..43dd3b698 --- /dev/null +++ b/tests/bugs162/pr241847/CC.java @@ -0,0 +1,15 @@ + +public class CC implements II { + public void m1(String arg) { + } + + public static void main(String [] args) throws Exception { + try { + new CC().m1(null); + throw new Exception("(BAD) advice did not run"); + } catch (RuntimeException e) { + System.out.println("(GOOD) advice ran and threw expected exception"); + e.printStackTrace(System.out); + } + } +} diff --git a/tests/bugs162/pr241847/II.java b/tests/bugs162/pr241847/II.java new file mode 100644 index 000000000..f059f6927 --- /dev/null +++ b/tests/bugs162/pr241847/II.java @@ -0,0 +1,4 @@ + +public interface II { + public void m1(@Ann String arg); +} diff --git a/tests/bugs162/pr241847/LongLong.java b/tests/bugs162/pr241847/LongLong.java new file mode 100644 index 000000000..40546bf8f --- /dev/null +++ b/tests/bugs162/pr241847/LongLong.java @@ -0,0 +1,14 @@ +public class LongLong implements II { + public void m1(String arg) { + } + + public static void main(String [] args) throws Exception { + try { + new LongLong().m1(null); + throw new Exception("(BAD) advice did not run"); + } catch (RuntimeException e) { + System.out.println("(GOOD) advice ran and threw expected exception"); + e.printStackTrace(System.out); + } + } +} |