aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/declareBinding
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-09-10 00:35:18 +0000
committerjhugunin <jhugunin>2003-09-10 00:35:18 +0000
commitd78d9ed48963cf302c26daab6af782d9b01ea3ac (patch)
tree73e1aaa7c847dac6ab50d3dd36f1bb62fbd5edd4 /tests/bugs/declareBinding
parentd9b32bb20a67995c994a45857d1f16ae84041a1b (diff)
downloadaspectj-d78d9ed48963cf302c26daab6af782d9b01ea3ac.tar.gz
aspectj-d78d9ed48963cf302c26daab6af782d9b01ea3ac.zip
fix and tests for at least 2 bugs:
Bugzilla Bug 42740 declare error fails on pointcuts composed from multiple classes Bugzilla Bug 42746 within() pcd is confused for certain declare softs and probably: Bugzilla Bug 42739 Compiler crash in ajc head (post 1.1.1 rc1)
Diffstat (limited to 'tests/bugs/declareBinding')
-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