jdk/test/sun/tools/jcmd/TestJcmdSanity.java
changeset 28412 adcb8be2a2b0
parent 24505 d2c5179475ea
child 30376 2ccf2cf7ea48
--- a/jdk/test/sun/tools/jcmd/TestJcmdSanity.java	Fri Dec 19 17:01:45 2014 -0800
+++ b/jdk/test/sun/tools/jcmd/TestJcmdSanity.java	Wed Dec 24 17:54:00 2014 +0300
@@ -25,6 +25,9 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.List;
 
 import jdk.testlibrary.JcmdBase;
@@ -160,11 +163,11 @@
     }
 
     private static void verifyOutputAgainstFile(OutputAnalyzer output) throws IOException {
-        File file = new File(TEST_SRC, "help_help.out");
-        List<String> fileOutput = Utils.fileAsList(file);
+        Path path = Paths.get(TEST_SRC, "help_help.out");
+        List<String> fileOutput = Files.readAllLines(path);
         List<String> outputAsLines = output.asLines();
         assertTrue(outputAsLines.containsAll(fileOutput),
-                "The ouput should contain all content of " + file.getAbsolutePath());
+                "The ouput should contain all content of " + path.toAbsolutePath());
     }
 
 }