aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/declareBinding/SampleExceptionHandling1.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/declareBinding/SampleExceptionHandling1.java')
-rw-r--r--tests/bugs/declareBinding/SampleExceptionHandling1.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/bugs/declareBinding/SampleExceptionHandling1.java b/tests/bugs/declareBinding/SampleExceptionHandling1.java
new file mode 100644
index 000000000..4b5e4ae48
--- /dev/null
+++ b/tests/bugs/declareBinding/SampleExceptionHandling1.java
@@ -0,0 +1,21 @@
+public class SampleExceptionHandling1 {
+ public void mumble() throws java.io.IOException { } // CE expected
+}
+
+
+/** @author Ron Bodkin */
+aspect Library {
+ public pointcut executionsThrowingChecked() :
+ execution(* *(..) throws (Exception+ && !RuntimeException));
+}
+
+/** @author Ron Bodkin */
+aspect SampleExceptionHandling {
+ public pointcut scope() : within(SampleExceptionHandling1);
+
+ public pointcut executionsThrowingChecked() :
+ Library.executionsThrowingChecked() && scope();
+
+ declare error : executionsThrowingChecked():
+ "no checked exceptions";
+} \ No newline at end of file