1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.annotation.suppresswarnings;
12
13 public class InputSuppressWarningsHolder {
14 static final String UN_U = "UN_U";
15
16 @SuppressWarnings(UN_U)
17 int a;
18 @SuppressWarnings(InputSuppressWarningsHolder.UN_U)
19 int b;
20 @SuppressWarnings(
21 com.puppycrawl.tools.checkstyle.checks.annotation.suppresswarnings.InputSuppressWarningsHolder.UN_U)
22 int c;
23 @SuppressWarnings(value = UN_U)
24 int d;
25 @SuppressWarnings(value = InputSuppressWarningsHolder.UN_U)
26 int e;
27 @SuppressWarnings(value =
28 com.puppycrawl.tools.checkstyle.checks.annotation.suppresswarnings.InputSuppressWarningsHolder.UN_U)
29 int f;
30 @SuppressWarnings((1 != 1) ? "" : "UN_U")
31 int g;
32 @SuppressWarnings("un" + "used")
33 int h;
34 @SuppressWarnings((String) "UN_U")
35 int i;
36 @SuppressWarnings({})
37 int j;
38 @SuppressWarnings({UN_U})
39 int k;
40 }
41
42 class CustomSuppressWarnings {
43 @SuppressWarnings
44 private @interface SuppressWarnings {
45 }
46 }