Merge pull request #89 from kemitix/sonar-close-try-resources
Sonar close try resources
This commit is contained in:
commit
92c98da897
1 changed files with 1 additions and 2 deletions
|
@ -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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue