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
16 @SuppressWarnings("unchecked")
17 public class InputSuppressWarningsSingle3
18 {
19 @SuppressWarnings(" ")
20 class Empty {
21
22 @SuppressWarnings("")
23 public Empty() {
24
25 }
26 }
27
28 @SuppressWarnings("unused")
29 enum Duh {
30
31 @SuppressWarnings("unforgiven")
32 D;
33
34 public static void foo() {
35
36 @SuppressWarnings("unused")
37 Object o = new InputSuppressWarningsSingle3() {
38
39 @Override
40 @SuppressWarnings("unchecked")
41
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 @SuppressWarnings("")
66 int a = 1;
67
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
79 @SuppressWarnings((false) ? "unchecked" : "")
80 class Cond {
81
82
83 @SuppressWarnings((false) ? "" : "unchecked")
84 public Cond() {
85
86 }
87
88
89 @SuppressWarnings((false) ? (true) ? " " : "unused" : "unchecked")
90 public void aCond1() {
91
92 }
93
94
95 @SuppressWarnings((false) ? "unchecked" : (true) ? " " : "unused")
96 public void aCond2() {
97
98 }
99
100
101 @java.lang.SuppressWarnings((false) ? "unchecked" :
102 ("" == "") ? (false) ? (true) ? "" : "foo" : " " : "unused")
103 public void seriously() {
104
105 }
106 }
107 }