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:
Alexander Kulyakhtin 2015-07-30 12:41:39 +03:00
parent 4b348c9fec
commit 98fb52479f

View File

@ -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));
}
/**