1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.annotation.suppresswarnings;
12
13 import java.lang.annotation.Documented;
14
15 @SuppressWarnings("unchecked")
16 public class InputSuppressWarningsSingle1
17 {
18
19 @SuppressWarnings(" ")
20 class Empty {
21
22
23 @SuppressWarnings("")
24 public Empty() {
25
26 }
27 }
28
29 @SuppressWarnings("unused")
30 enum Duh {
31
32 @SuppressWarnings("unforgiven")
33 D;
34
35 public static void foo() {
36
37 @SuppressWarnings("unused")
38 Object o = new InputSuppressWarningsSingle1() {
39
40 @Override
41 @SuppressWarnings("unchecked")
42 public String toString() {
43 return "";
44 }
45 };
46 }
47 }
48
49 @SuppressWarnings("abcun")
50 @Documented
51 @interface Sweet {
52 int cool();
53 }
54
55 @Documented
56 @SuppressWarnings("abcun")
57 @interface MoreSweetness {
58
59 @SuppressWarnings("unused")
60 int cool();
61 }
62
63 public class Junk {
64
65
66 @SuppressWarnings("")
67 int a = 1;
68
69 @SuppressWarnings("unchecked")
70 @Deprecated
71 int b = 1;
72 void doFoo(String s, @SuppressWarnings("unchecked")String y) {
73
74 }
75 }
76
77
78 @SuppressWarnings((false) ? "unchecked" : "")
79 class Cond {
80
81
82 @SuppressWarnings((false) ? "" : "unchecked")
83 public Cond() {
84
85 }
86
87
88 @SuppressWarnings((false) ? (true) ? " " : "unused" : "unchecked")
89 public void aCond1() {
90
91 }
92
93
94 @SuppressWarnings((false) ? "unchecked" : (true) ? " " : "unused")
95 public void aCond2() {
96
97 }
98
99 @java.lang.SuppressWarnings((false) ? "unchecked" :
100 ("" == "") ? (false) ? (true) ? "" : "foo" : " " : "unused")
101 public void seriously() {
102
103 }
104 }
105 }