diff options
Diffstat (limited to 'tests/bugs152/pr129282/MethodCallInDiffClass.aj')
-rw-r--r-- | tests/bugs152/pr129282/MethodCallInDiffClass.aj | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/bugs152/pr129282/MethodCallInDiffClass.aj b/tests/bugs152/pr129282/MethodCallInDiffClass.aj new file mode 100644 index 000000000..f63e551d5 --- /dev/null +++ b/tests/bugs152/pr129282/MethodCallInDiffClass.aj @@ -0,0 +1,28 @@ +import java.io.FileNotFoundException; + +public aspect MethodCallInDiffClass { + + pointcut p() : call(public * B1.m2()); + + before() throws FileNotFoundException : p() { + throw new FileNotFoundException(); + } + +} + +class B { + + public void m1() throws FileNotFoundException { + new B1().m2(); + } + +} + +class B1 { + + // don't want the 'declared exception not acutally + // thrown' warning since the advice is throwing it + public void m2() throws FileNotFoundException { + } + +} |