Skip to content

Commit cb36c8b

Browse files
committed
run spotless
1 parent 0e6b460 commit cb36c8b

File tree

1 file changed

+3
-10
lines changed
  • lib/src/main/java/com/diffplug/spotless/protobuf

1 file changed

+3
-10
lines changed

lib/src/main/java/com/diffplug/spotless/protobuf/BufStep.java

+3-10
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.io.IOException;
2020
import java.io.Serializable;
2121
import java.nio.charset.StandardCharsets;
22-
import java.util.Arrays;
2322
import java.util.List;
2423
import java.util.Objects;
2524
import java.util.regex.Pattern;
@@ -78,20 +77,14 @@ static class State implements Serializable {
7877
final String version;
7978
final transient ForeignExe exe;
8079

81-
State(BufStep step, ForeignExe exe) {
80+
State(BufStep step, ForeignExe exe) {
8281
this.version = step.version;
8382
this.exe = Objects.requireNonNull(exe);
8483
}
8584

8685
String format(ProcessRunner runner, String input, File file) throws IOException, InterruptedException {
87-
return runner.exec(
88-
input.getBytes(StandardCharsets.UTF_8),
89-
List.of(
90-
exe.confirmVersionAndGetAbsolutePath(),
91-
"format",
92-
file.getAbsolutePath()
93-
)
94-
).assertExitZero(StandardCharsets.UTF_8);
86+
List<String> args = List.of(exe.confirmVersionAndGetAbsolutePath(), "format", file.getAbsolutePath());
87+
return runner.exec(input.getBytes(StandardCharsets.UTF_8), args).assertExitZero(StandardCharsets.UTF_8);
9588
}
9689

9790
FormatterFunc.Closeable toFunc() {

0 commit comments

Comments
 (0)