Skip to content

Commit e35f60e

Browse files
cushongoogle-java-format Team
authored and
google-java-format Team
committed
Reformat the formatter
To avoid spurious diffs during other development. PiperOrigin-RevId: 695452895
1 parent beacc08 commit e35f60e

File tree

10 files changed

+20
-16
lines changed

10 files changed

+20
-16
lines changed

core/src/main/java/com/google/googlejavaformat/Newlines.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private void advance() {
135135
if (idx + 1 < input.length() && input.charAt(idx + 1) == '\n') {
136136
idx++;
137137
}
138-
// falls through
138+
// falls through
139139
case '\n':
140140
idx++;
141141
curr = idx;

core/src/main/java/com/google/googlejavaformat/OpsBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
public final class OpsBuilder {
4040

41-
/** @return the actual size of the AST node at position, including comments. */
41+
/** Returns the actual size of the AST node at position, including comments. */
4242
public int actualSize(int position, int length) {
4343
Token startToken = input.getPositionTokenMap().get(position);
4444
int start = startToken.getTok().getPosition();
@@ -57,7 +57,7 @@ public int actualSize(int position, int length) {
5757
return end - start;
5858
}
5959

60-
/** @return the start column of the token at {@code position}, including leading comments. */
60+
/** Returns the start column of the token at {@code position}, including leading comments. */
6161
public Integer actualStartColumn(int position) {
6262
Token startToken = input.getPositionTokenMap().get(position);
6363
int start = startToken.getTok().getPosition();
@@ -316,7 +316,7 @@ public final void guessToken(String token) {
316316
token,
317317
Doc.Token.RealOrImaginary.IMAGINARY,
318318
ZERO,
319-
/* breakAndIndentTrailingComment= */ Optional.empty());
319+
/* breakAndIndentTrailingComment= */ Optional.empty());
320320
}
321321

322322
public final void token(
@@ -359,7 +359,7 @@ public final void op(String op) {
359359
op.substring(i, i + 1),
360360
Doc.Token.RealOrImaginary.REAL,
361361
ZERO,
362-
/* breakAndIndentTrailingComment= */ Optional.empty());
362+
/* breakAndIndentTrailingComment= */ Optional.empty());
363363
}
364364
}
365365

@@ -427,7 +427,7 @@ public final void breakToFill(String flat) {
427427
* @param plusIndent extra indent if taken
428428
*/
429429
public final void breakOp(Doc.FillMode fillMode, String flat, Indent plusIndent) {
430-
breakOp(fillMode, flat, plusIndent, /* optionalTag= */ Optional.empty());
430+
breakOp(fillMode, flat, plusIndent, /* optionalTag= */ Optional.empty());
431431
}
432432

433433
/**

core/src/main/java/com/google/googlejavaformat/java/JavaCommentsHelper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,3 @@ private static boolean javadocShaped(List<String> lines) {
185185
return true;
186186
}
187187
}
188-

core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public void append(String text, Range<Integer> range) {
140140
if (i + 1 < text.length() && text.charAt(i + 1) == '\n') {
141141
i++;
142142
}
143-
// falls through
143+
// falls through
144144
case '\n':
145145
spacesPending = new StringBuilder();
146146
++newlinesPending;

core/src/main/java/com/google/googlejavaformat/java/filer/FormattingFiler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ public final class FormattingFiler implements Filer {
3737
private final Formatter formatter = new Formatter();
3838
private final Messager messager;
3939

40-
/** @param delegate filer to decorate */
40+
/**
41+
* @param delegate filer to decorate
42+
*/
4143
public FormattingFiler(Filer delegate) {
4244
this(delegate, null);
4345
}

core/src/main/java/com/google/googlejavaformat/java/javadoc/JavadocWriter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
final class JavadocWriter {
4141
private final int blockIndent;
4242
private final StringBuilder output = new StringBuilder();
43+
4344
/**
4445
* Whether we are inside an {@code <li>} element, excluding the case in which the {@code <li>}
4546
* contains a {@code <ul>} or {@code <ol>} that we are also inside -- unless of course we're

core/src/test/java/com/google/googlejavaformat/java/CommandLineFlagsTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
import org.junit.runner.RunWith;
2222
import org.junit.runners.JUnit4;
2323

24-
/**
25-
* Tests for command-line flags.
26-
*/
24+
/** Tests for command-line flags. */
2725
@RunWith(JUnit4.class)
2826
public class CommandLineFlagsTest {
2927

core/src/test/java/com/google/googlejavaformat/java/JavadocFormattingTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ public void paragraphTag() {
10841084
@Test
10851085
public void xhtmlParagraphTag() {
10861086
String[] input = {
1087-
"class Test {",
1087+
"class Test {", //
10881088
" /**",
10891089
" * hello<p/>world",
10901090
" */",
@@ -1093,7 +1093,7 @@ public void xhtmlParagraphTag() {
10931093
"}",
10941094
};
10951095
String[] expected = {
1096-
"class Test {",
1096+
"class Test {", //
10971097
" /**",
10981098
" * hello",
10991099
" *",

eclipse_plugin/src/com/google/googlejavaformat/java/GoogleJavaFormatter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ private List<Range<Integer>> rangesFromRegions(IRegion[] regions) {
106106
return ranges;
107107
}
108108

109-
/** @return {@code true} if input and output texts are equal, else {@code false}. */
109+
/**
110+
* @return {@code true} if input and output texts are equal, else {@code false}.
111+
*/
110112
private boolean idempotent(String source, IRegion[] regions, List<Replacement> replacements) {
111113
// This implementation only checks for single replacement.
112114
if (replacements.size() == 1) {

idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatConfigurable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ private void createUIComponents() {
199199
false));
200200
}
201201

202-
/** @noinspection ALL */
202+
/**
203+
* @noinspection ALL
204+
*/
203205
public JComponent $$$getRootComponent$$$() {
204206
return panel;
205207
}

0 commit comments

Comments
 (0)