aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-01-07 15:21:26 +0000
committeracolyer <acolyer>2004-01-07 15:21:26 +0000
commit01055e854df883746321b955bd5b9b41a840feda (patch)
treed13cdfae53c05904088d4dcb60f2d4917c150c60 /tests
parenteac16aee966695c8f0d22c4961c63a27e61dd2bf (diff)
downloadaspectj-01055e854df883746321b955bd5b9b41a840feda.tar.gz
aspectj-01055e854df883746321b955bd5b9b41a840feda.zip
fix for pr 48522, not warning on (un)softened exception
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml13
-rw-r--r--tests/bugs/SofteningTooMuch.java15
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 3f9841dc7..3b834af69 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -6821,5 +6821,18 @@
<message kind="error" line="20" text="incompatible type"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs" pr="49250"
+ title="alias getCause for getWrappedThrowable in SoftException">
+ <compile files="GetCauseOnSoftException.java" options="-Xlint:warning">
+ </compile>
+ <run vm="1.3" class="GetCauseOnSoftException"/>
+ </ajc-test>
+ <ajc-test dir="bugs" pr="48522"
+ title="Declare soft softening other exception types">
+ <compile files="SofteningTooMuch.java">
+ <message kind="error" line="6" text="Unhandled exception"/>
+ </compile>
+ </ajc-test>
</suite>
diff --git a/tests/bugs/SofteningTooMuch.java b/tests/bugs/SofteningTooMuch.java
new file mode 100644
index 000000000..164adb24c
--- /dev/null
+++ b/tests/bugs/SofteningTooMuch.java
@@ -0,0 +1,15 @@
+
+// pr 48522
+
+public class SofteningTooMuch {
+ public static void main(String args[]) {
+ throw new Exception("should be a compiler error here");
+ }
+}
+
+class FooException extends Exception {}
+
+aspect ExcPolicy {
+ declare soft: FooException: execution(* SofteningTooMuch.*(..));
+}
+