blob: f5d19a180828c8cf1dfefd18cb1d4d1006d559cb (
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
34
35
36
37
38
39
40
|
import java.lang.annotation.*;
aspect ExactAnnotationTypePatternBug {
before(Throwable e) : handler(Throwable+) && args(e) &&
!args(@NoDefaultHandler Throwable+) {
}
}
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.PARAMETER)
@interface NoDefaultHandler {
}
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
private void th() throws Throwable {
throw new Throwable();
}
private void test() {
try {
th();
} catch (Throwable e) {
}
}
}
|