1
2
3
4
5
6
7
8 package com.puppycrawl.tools.checkstyle.checks.indentation.commentsindentation;
9
10 public class InputCommentsIndentationInEmptyBlock {
11
12 private void foo1() {
13 int a = 5, b = 3, v = 6;
14 if (a == b
15 && v == b || ( a ==1
16
17
18
19 && b == 1) ) {
20
21 }
22 }
23
24 private void foo2() {
25 int a = 5, b = 3, v = 6;
26 if (a == b
27 && v == b || ( a ==1
28 && b == 1) ) {
29
30
31
32 }
33 }
34
35 private void foo3() {
36 int a = 5, b = 3, v = 6;
37 if (a == b
38 && v == b || (a == 1
39 && b == 1)) {
40
41 }
42 }
43
44
45 @SuppressWarnings("unused")
46 private static void foo4() {
47 if (true)
48 {
49
50 }
51 if (true) {
52
53 }
54
55
56
57 }
58
59
60 @SuppressWarnings("unused")
61 private static void foo5() {
62 if (true)
63 {
64
65 }
66 if (true) {
67
68 }
69
70
71
72 }
73
74 public void foo6() {
75 try {
76
77 } catch (Exception e) {
78
79 }
80 }
81
82 public void foo7() {
83 try {
84
85 } catch (Exception e) {
86
87 }
88 }
89
90 private static class MyClass extends Object {
91
92 }
93
94 private static class MyClass1 extends Object {
95
96
97 }
98
99 public void foo8() {
100 String[] array1 = {
101
102 };
103 String[] array2 = {
104
105 };
106 String[] array3 = {
107
108 };
109 String[] array4 = {
110
111 };
112 String[] array5 = {
113
114
115 };
116 }
117 }