mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-20 12:53:29 +00:00
8130527: Serviceability tests fails with Can't attach to process
A helper method changed to provide workaround for 8132539 Reviewed-by: jbachorik
This commit is contained in:
parent
4b348c9fec
commit
98fb52479f
@ -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