blob: 033922deb94f821bd19dff74eef33fcf7ea1bdd5 (
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
26
27
28
29
30
31
32
33
|
import org.aspectj.testing.Tester;
import org.aspectj.lang.*;
import java.io.*;
/** @testcase Bugzilla Bug 29691
Static inner aspects cannot reference user defined pointcuts
*/
public class SoftWithin {
static void foo() throws IOException {
throw new IOException();
}
public static void main(String[] args) throws Exception{
try {
foo();
} catch (SoftException se) {
return;
}
Tester.checkFailed("should have got SoftException");
}
}
aspect Soften {
declare soft : IOException : within(SoftWithin);
}
|