From 0c32756f5a04948bdc91bae753693762f208a224 Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Tue, 23 Aug 2016 15:17:07 -0400 Subject: [PATCH] Fix outdated comments about FileReader The comments mention that the constructor that takes a File or Path internally creates a FileReader with the JVM's default CharSet. This is not the case: it instead creates an InputStreamReader with the specified charset. I've removed the incorrect comments. --- src/main/java/org/apache/commons/csv/CSVParser.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index 14ba9ff53c..880e537125 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -138,11 +138,6 @@ public final class CSVParser implements Iterable, Closeable { /** * Creates a parser for the given {@link File}. * - *

Note: This method internally creates a FileReader using - * {@link java.io.FileReader#FileReader(java.io.File)} which in turn relies on the default encoding of the JVM that - * is executing the code. If this is insufficient create a URL to the file and use - * {@link #parse(URL, Charset, CSVFormat)}

- * * @param file * a CSV file. Must not be null. * @param charset @@ -192,12 +187,7 @@ public static CSVParser parse(final InputStream inputStream, final Charset chars } /** - * Creates a parser for the given {@link File}. - * - *

Note: This method internally creates a FileReader using - * {@link java.io.FileReader#FileReader(java.io.File)} which in turn relies on the default encoding of the JVM that - * is executing the code. If this is insufficient create a URL to the file and use - * {@link #parse(URL, Charset, CSVFormat)}

+ * Creates a parser for the given {@link Path}. * * @param path * a CSV file. Must not be null.