1 package com.google.checkstyle.test.chapter4formatting.rule412nonemptyblocks;
2
3 import java.lang.annotation.ElementType;
4 import java.lang.annotation.Target;
5 import java.util.ArrayList;
6 import java.util.List;
7
8 @TestClassAnnotation
9 class InputLeftCurlyAnnotations
10 {
11 private static final int X = 10;
12
13 @Override
14 public boolean equals(
15 Object other)
16 {
17 return false;
18 }
19
20 @Override
21 @SuppressWarnings("unused")
22 public int hashCode()
23 {
24 int a = 10;
25 return 1;
26 }
27
28 @Override
29 @SuppressWarnings({"unused", "unchecked", "static-access"})
30 public String toString()
31 {
32 Integer i = this.X;
33 List<String> l = new ArrayList();
34 return "SomeString";
35 }
36 }
37
38
39 @TestClassAnnotation
40 class InputLeftCurlyAnnotations2 {
41 private static final int X = 10;
42
43 @Override
44 public boolean equals(Object other) {
45 return false;
46 }
47
48 @Override
49 @SuppressWarnings("unused")
50 public int hashCode() {
51 int a = 10;
52 return 1;
53 }
54
55 @Override
56 @SuppressWarnings({"unused", "unchecked", "static-access"})
57 public String toString()
58 {
59 Integer i = this.X;
60 List<String> l = new ArrayList();
61 return "SomeString";
62 }
63 }
64
65
66 @Target(ElementType.TYPE)
67 @interface TestClassAnnotation {}