changeset 8786:b3f1bf7dfaba

Merge
author dsamersoff
date Thu, 30 Jul 2015 16:23:03 +0000
parents 56a527afc34a 626fe6fdc7e5
children 29e04e68ff8c
files
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/testlibrary/jdk/test/lib/Utils.java	Thu Jul 30 16:26:00 2015 +0300
+++ b/test/testlibrary/jdk/test/lib/Utils.java	Thu Jul 30 16:23:03 2015 +0000
@@ -314,9 +314,8 @@
      */
     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));
     }
 
     /**