@@ -67,7 +67,7 @@ public static void main(String[] args) throws IOException {
67
67
Model model = new Model ("org.openqa.selenium.devtools" );
68
68
Stream .of ("browser_protocol.json" , "js_protocol.json" ).forEach (protoFile -> {
69
69
try {
70
- String text = Files .readString (source .resolve (protoFile ));
70
+ String text = String . join ( " \n " , Files .readAllLines (source .resolve (protoFile ) ));
71
71
Map <String , Object > json = new Json ().toType (text , Json .MAP_TYPE );
72
72
model .parse (json );
73
73
} catch (IOException e ) {
@@ -307,7 +307,7 @@ private void dumpMainClass(Path target) {
307
307
ensureFileDoesNotExists (commandFile );
308
308
309
309
try {
310
- Files .writeString (commandFile , unit .toString ());
310
+ Files .write (commandFile , unit .toString (). getBytes ());
311
311
} catch (IOException e ) {
312
312
throw new UncheckedIOException (e );
313
313
}
@@ -371,7 +371,7 @@ public void dumpTo(Path target) {
371
371
ensureFileDoesNotExists (eventFile );
372
372
373
373
try {
374
- Files .writeString (eventFile , unit .toString ());
374
+ Files .write (eventFile , unit .toString (). getBytes ());
375
375
} catch (IOException e ) {
376
376
throw new UncheckedIOException (e );
377
377
}
@@ -450,7 +450,7 @@ public void dumpTo(Path target) {
450
450
ensureFileDoesNotExists (typeFile );
451
451
452
452
try {
453
- Files .writeString (typeFile , unit .toString ());
453
+ Files .write (typeFile , unit .toString (). getBytes ());
454
454
} catch (IOException e ) {
455
455
throw new UncheckedIOException (e );
456
456
}
0 commit comments