mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-23 16:55:09 +00:00
Merge
This commit is contained in:
commit
f31a35e2ca
@ -314,9 +314,8 @@ public final class Utils {
|
||||
*/
|
||||
public static String fileAsString(String filename) throws IOException {
|
||||
Path filePath = Paths.get(filename);
|
||||
return Files.exists(filePath)
|
||||
? Files.lines(filePath).collect(Collectors.joining(NEW_LINE))
|
||||
: null;
|
||||
if (!Files.exists(filePath)) return null;
|
||||
return new String(Files.readAllBytes(filePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user