Skip to content

Commit

Permalink
[java] Stop using features introduced in Java 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 13, 2019
1 parent c2745b9 commit a65b9dd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static void main(String[] args) throws IOException {
Model model = new Model("org.openqa.selenium.devtools");
Stream.of("browser_protocol.json", "js_protocol.json").forEach(protoFile -> {
try {
String text = Files.readString(source.resolve(protoFile));
String text = String.join("\n", Files.readAllLines(source.resolve(protoFile)));
Map<String, Object> json = new Json().toType(text, Json.MAP_TYPE);
model.parse(json);
} catch (IOException e) {
Expand Down Expand Up @@ -307,7 +307,7 @@ private void dumpMainClass(Path target) {
ensureFileDoesNotExists(commandFile);

try {
Files.writeString(commandFile, unit.toString());
Files.write(commandFile, unit.toString().getBytes());
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down Expand Up @@ -371,7 +371,7 @@ public void dumpTo(Path target) {
ensureFileDoesNotExists(eventFile);

try {
Files.writeString(eventFile, unit.toString());
Files.write(eventFile, unit.toString().getBytes());
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down Expand Up @@ -450,7 +450,7 @@ public void dumpTo(Path target) {
ensureFileDoesNotExists(typeFile);

try {
Files.writeString(typeFile, unit.toString());
Files.write(typeFile, unit.toString().getBytes());
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down

0 comments on commit a65b9dd

Please sign in to comment.