blob: c2b0c166c9e8c1b272b4d004b3995b1eb93881af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import org.aspectj.testing.Tester;
/** @testcase VerifyError after around advice falls off end of tryCatch */
public class TryOffEnd {
public static void main(String[] args) {
Tester.check(new TryOffEnd().error(), "functional failure");
}
public boolean error() {
String s = null;
try {
s = System.getProperty("unknown Property");
} catch (Throwable t) { // CW 13 cannot apply advice
t.printStackTrace(System.err);
}
return true;
}
}
aspect A {
Object around() : within(TryOffEnd) && handler(Throwable) { // CW 21 cannot apply advice
Object result = proceed();
return result;
}
}
|