1
2
3 package com.google.checkstyle.test.chapter4formatting.rule4861blockcommentstyle;
4
5 import java.util.Arrays;
6
7
8
9
10 public class InputFormattedCommentsIndentationSurroundingCode {
11 private void foo1() {
12 if (true) {
13
14 int k = 0;
15
16
17 int b = 10;
18
19 }
20 }
21
22 private void foo2() {
23 if (true) {
24
25 int k = 0;
26
27
28
29 int b = 10;
30
31
32
33 double d;
34
35
36
37
38 boolean bb;
39
40
41
42
43
44
45
46
47
48 boolean x;
49 }
50 }
51
52 private void foo3() {
53 int a = 5;
54 int b = 3;
55 int v = 6;
56 if (a == b && v == b
57 || (a == 1
58
59
60
61
62 && b == 1)) {
63
64 }
65 }
66
67 private static void com() {
68 boolean b = true;
69 }
70
71 private static final String[][] mergeMatrix = {
72
73 {
74 "",
75 },
76 {
77 "", "",
78 },
79 {
80 "NEVER", "UNKNOWN", "NEVER",
81 },
82 {"UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN"},
83 };
84
85 private void foo4() {
86 if (!Arrays.equals(new String[] {""}, new String[] {""}) ) {
87
88 }
89 }
90
91
92 private static void testing() {}
93
94
95 public void foid5() {
96 String s = "";
97 s.toString().toString().toString();
98
99 }
100
101
102 public void foo6() {
103
104
105
106
107
108
109 String someStr = new String();
110 }
111
112
113 public void foo7() {
114
115
116
117
118
119
120 String someStr = new String();
121 }
122
123
124 public void foo8() {
125 String s = new String();
126
127
128
129
130
131 String someStr = new String();
132 }
133
134
135 public String foo9(String s1, String s2, String s3) {
136 return "";
137 }
138
139
140 public void foo10() throws Exception {
141
142 final String pattern = "^foo$";
143
144 final String[] expected = {
145 "7:13: " + foo9("", "", ""),
146
147 };
148 }
149 }
150