org.aspectj/tests/bugs152/pr129282/MethodCallInDiffClass.aj
2006-05-31 10:09:27 +00:00

29 lines
473 B
Plaintext

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 {
}
}