1
2
3
4
5
6
7
8
9
10
11
12
13
14 package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;
15
16 class InputLeftCurlyTestNewLine3
17 {
18
19 int foo() throws InterruptedException
20 {
21 int x = 1;
22 int a = 2;
23 while (true)
24 {
25 try
26 {
27 if (x > 0)
28 {
29 break;
30 }
31 else if (x < 0) {
32 ;
33 }
34 else
35 {
36 break;
37 }
38 switch (a)
39 {
40 case 0:
41 break;
42 default:
43 break;
44 }
45 }
46 catch (Exception e)
47 {
48 break;
49 }
50 finally
51 {
52 break;
53 }
54 }
55
56 synchronized (this)
57 {
58 do
59 {
60 x = 2;
61 } while (x == 2);
62 }
63
64 this.wait(666
65 );
66
67 for (int k = 0; k < 1; k++)
68 {
69 String innerBlockVariable = "";
70 }
71
72
73 if (System.currentTimeMillis() > 1000)
74 return 1;
75 else
76 return 2;
77 }
78
79
80 static
81 {
82 int x = 1;
83 }
84
85
86
87 public enum GreetingsEnum
88 {
89 HELLO,
90 GOODBYE
91 };
92
93 void method2()
94 {
95 boolean flag = true;
96 if (flag) {
97 System.identityHashCode("heh");
98 flag = !flag; } String.CASE_INSENSITIVE_ORDER.
99 equals("Xe-xe");
100
101
102 if (flag) { String.valueOf("ok"); }
103 }
104 }
105
106
107
108
109
110 class FooCtorTestNewLine3
111 {
112 int i;
113 public void FooCtor()
114 {
115 i = 1;
116 }}
117
118
119
120
121
122 class FooMethodTestNewLine3
123 {
124 public void fooMethod()
125 {
126 int i = 1;
127 }}
128
129
130
131
132
133 class FooInnerTestNewLine3
134 {
135 class InnerFoo
136 {
137 public void fooInnerMethod ()
138 {
139
140 }
141 }}
142
143
144
145
146
147 class Absent_CustomFieldSerializer3TestNewLine3 {
148
149 public static void serialize() {}
150 }
151
152 class Absent_CustomFieldSerializer4TestNewLine3
153 {
154 public void Absent_CustomFieldSerializer4() {}
155 }
156
157 class EmptyClass2TestNewLine3 {}
158
159 interface EmptyInterface3TestNewLine3 {}
160
161 class ClassWithStaticInitializersTestNewLine3
162 {
163 static {
164 }
165 static
166 {}
167
168 static class Inner
169 {
170 static {
171 int i = 1;
172 }
173 }
174
175 }