Skip to content

Commit 8c85ac1

Browse files
cushongoogle-java-format Team
authored andcommitted
Follow-up to 0a6a85e
See investigation in b/269345183 PiperOrigin-RevId: 509647966
1 parent 0a6a85e commit 8c85ac1

File tree

1 file changed

+2
-1
lines changed
  • core/src/main/java/com/google/googlejavaformat/java

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ private int formatFiles(CommandLineOptions parameters, JavaFormatterOptions opti
137137
}
138138
Path path = Paths.get(fileName);
139139
try {
140-
cs.submit(new FormatFileCallable(parameters, path, Files.readString(path), options));
140+
String input = new String(Files.readAllBytes(path), UTF_8);
141+
cs.submit(new FormatFileCallable(parameters, path, input, options));
141142
files++;
142143
} catch (IOException e) {
143144
errWriter.println(fileName + ": could not read file: " + e.getMessage());

0 commit comments

Comments
 (0)