aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs152/pr129282/InnerMethodCall.aj
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs152/pr129282/InnerMethodCall.aj')
-rw-r--r--tests/bugs152/pr129282/InnerMethodCall.aj52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/bugs152/pr129282/InnerMethodCall.aj b/tests/bugs152/pr129282/InnerMethodCall.aj
new file mode 100644
index 000000000..ed1f54c3d
--- /dev/null
+++ b/tests/bugs152/pr129282/InnerMethodCall.aj
@@ -0,0 +1,52 @@
+import java.io.FileNotFoundException;
+
+public aspect InnerMethodCall {
+
+ pointcut p() : call(public * C1.m2());
+
+ before() throws FileNotFoundException : p() {
+ throw new FileNotFoundException();
+ }
+
+ pointcut p2() : call(public * C1.m4());
+
+ before() : p2() {
+ }
+
+}
+
+class C1 {
+
+ public void m1() {
+ new C2() {
+ public void m6() throws FileNotFoundException {
+ new C1().m2();
+ }
+ };
+ }
+
+ // don't want the 'declared exception not actually
+ // thrown' warning because the advice is affecting
+ // this method
+ public void m2() throws FileNotFoundException {
+ }
+
+ public void m3() {
+ new C2() {
+ public void m6() throws FileNotFoundException {
+ new C1().m4();
+ }
+ };
+ }
+
+ // do want the 'declared exception not actually
+ // thrown' warning
+ public void m4() throws FileNotFoundException {
+ }
+
+
+}
+
+abstract class C2 {
+ public abstract void m6() throws FileNotFoundException;
+}