aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/PR72157.java
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-09-08 12:04:49 +0000
committeracolyer <acolyer>2004-09-08 12:04:49 +0000
commiteca1429e79b3dc55c1f93ffbadb3e50eb9808d9c (patch)
treed0618572a7c870e847b2d79c855c0a59420f7054 /tests/bugs/PR72157.java
parent8e4d8980e45ba054e7d8e3e5e7ac3aca940d0758 (diff)
downloadaspectj-eca1429e79b3dc55c1f93ffbadb3e50eb9808d9c.tar.gz
aspectj-eca1429e79b3dc55c1f93ffbadb3e50eb9808d9c.zip
fix for Bugzilla Bug 72157
declare soft can cause programs with invalid exception behaviour to be generated
Diffstat (limited to 'tests/bugs/PR72157.java')
-rw-r--r--tests/bugs/PR72157.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs/PR72157.java b/tests/bugs/PR72157.java
new file mode 100644
index 000000000..39120f5f4
--- /dev/null
+++ b/tests/bugs/PR72157.java
@@ -0,0 +1,35 @@
+public class PR72157 {
+ public PR72157() throws Exception {
+ throw new Exception();
+ }
+
+ public static void main(String[] args) {
+ new SCE2();
+ }
+}
+
+class SCE2 extends PR72157 {
+ public SCE2() {
+ super(); // CE L13?
+ }
+
+}
+
+class Foo {
+
+ public Foo() throws Exception {
+ throw new Exception();
+ }
+
+}
+
+class Goo {
+ public Goo() {
+ new Foo();
+ }
+}
+
+aspect SCEAspect {
+ declare soft: Exception: within(SCE2);
+ declare soft: Exception: within(Goo);
+} \ No newline at end of file