aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
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
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')
-rw-r--r--tests/bugs/ConvertToUnchecked.java2
-rw-r--r--tests/bugs/PR72157.java35
2 files changed, 36 insertions, 1 deletions
diff --git a/tests/bugs/ConvertToUnchecked.java b/tests/bugs/ConvertToUnchecked.java
index eb71e9f7b..966bc69d3 100644
--- a/tests/bugs/ConvertToUnchecked.java
+++ b/tests/bugs/ConvertToUnchecked.java
@@ -35,7 +35,7 @@ class PersistenceException extends RuntimeException
class Root {
- Root(String s) throws IOException {
+ Root(String s) /*throws IOException*/ {
}
}
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