8067173: remove Utils::fileAsList
authortpivovarova
Tue, 16 Dec 2014 17:26:42 +0300
changeset 28387 ca7473b3239c
parent 28386 06892f6d6d72
child 28388 47357a25347a
8067173: remove Utils::fileAsList Reviewed-by: kvn, iignatyev
hotspot/test/testlibrary/com/oracle/java/testlibrary/Utils.java
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/Utils.java	Tue Dec 23 16:36:44 2014 +0300
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/Utils.java	Tue Dec 16 17:26:42 2014 +0300
@@ -307,25 +307,6 @@
     }
 
     /**
-     * Returns file content as a list of strings
-     *
-     * @param file File to operate on
-     * @return List of strings
-     * @throws IOException
-     */
-    public static List<String> fileAsList(File file) throws IOException {
-        assertTrue(file.exists() && file.isFile(),
-                file.getAbsolutePath() + " does not exist or not a file");
-        List<String> output = new ArrayList<>();
-        try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsolutePath()))) {
-            while (reader.ready()) {
-                output.add(reader.readLine().replace(NEW_LINE, ""));
-            }
-        }
-        return output;
-    }
-
-    /**
      * Return the contents of the named file as a single String,
      * or null if not found.
      * @param filename name of the file to read