Merge remote-tracking branch 'github/develop'

* github/develop:
  Use Files.readAllLines
  Close file ready with try-with-resources
This commit is contained in:
Paul Campbell 2018-07-07 12:29:04 +01:00
commit 7826927f58

View file

@ -94,8 +94,7 @@ class ReadmeWriter implements CommandLineRunner {
} }
private String readFile(final Path file) throws IOException { private String readFile(final Path file) throws IOException {
return Files.lines(file, StandardCharsets.UTF_8) return String.join(NEWLINE, Files.readAllLines(file, StandardCharsets.UTF_8));
.collect(Collectors.joining(NEWLINE));
} }
} }