blob: 55d7c5c0c5083dc0420e5498d3fa22e8d6a51efc (
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
41
42
43
44
45
46
47
|
package com.puppycrawl.tools.checkstyle.checks.annotation;
// suppress
@SuppressWarnings({})
public class InputAnnotationUseNoTrailingComma
{
@SuppressWarnings({"common"})
public void foo() {
/** Suppress warnings */
@SuppressWarnings({"common","foo"})
Object o = new Object() {
@SuppressWarnings(value={"common"})
public String toString() {
@SuppressWarnings(value={"leo","herbie"})
final String pooches = "leo.herbie";
return pooches;
}
};
}
@Test2(value={(false) ? "" : "foo"}, more={(true) ? "" : "bar"})
@Pooches2(tokens={},other={})
enum P {
@Pooches2(tokens={Pooches2.class},other={1})
L, // annotation in enum
@Test2(value={}, more={(false) ? "" : "unchecked"})
Y;
}
}
@interface Test2 {
String[] value();
String[] more() default {};
}
@interface Pooches2 {
Class<?>[] tokens();
int[] other();
}
|