1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;
10
11 class InputRightCurlyTestForceLineBreakBefore2
12 {
13
14 int foo() throws InterruptedException
15 {
16 int x = 1;
17 int a = 2;
18 while (true)
19 {
20 try
21 {
22 if (x > 0)
23 {
24 break;
25 } else if (x < 0) {
26 ;
27 } else { break; }
28 switch (a)
29 {
30 case 0:
31 break;
32 default:
33 break;
34 }
35 } catch (Exception e) { break; } finally { break; }
36 }
37
38 synchronized (this) { do { x = 2; } while (x == 2); }
39
40 synchronized (this) {
41 do {} while (x == 2);
42 }
43
44 for (int k = 0; k < 1; k++) { String innerBlockVariable = ""; }
45
46 for (int k = 0; k < 1; k++) {}
47 return a;
48 }
49
50 static { int x = 1; }
51
52 void method2()
53 {
54 boolean flag = false;
55 if (flag) { String.valueOf("foo"); }
56 }
57 }
58
59 class Absent_CustomFieldSerializerTestLineBreakBefore2 {
60
61 public static void serialize() {}
62 }
63
64 class Absent_CustomFieldSerializer10TestLineBreakBefore2
65 {
66 public void Absent_CustomFieldSerializer10() {}
67 }
68
69 class EmptyClassTestLineBreakBefore2 {}
70
71 interface EmptyInterfaceTestLineBreakBefore2 {}