changeset 7637:d4d484865822

8067173: remove Utils::fileAsList Reviewed-by: kvn, iignatyev
author tpivovarova
date Tue, 16 Dec 2014 17:26:42 +0300
parents 6750ba31b175
children 16ba94e0bd44
files test/testlibrary/com/oracle/java/testlibrary/Utils.java
diffstat 1 files changed, 0 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/test/testlibrary/com/oracle/java/testlibrary/Utils.java	Tue Dec 23 16:36:44 2014 +0300
+++ b/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