Author: ggregory
Date: Mon Mar 17 00:50:55 2014
New Revision: 1578191
URL: http://svn.apache.org/r1578191
Log:
The charset can be null and will default to UTF-8.
Modified:
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
Modified:
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
URL:
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java?rev=1578191&r1=1578190&r2=1578191&view=diff
==============================================================================
---
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
(original)
+++
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
Mon Mar 17 00:50:55 2014
@@ -183,7 +183,7 @@ public final class CSVParser implements
* @param url
* a URL. Must not be null.
* @param charset
- * the charset for the resource. Must not be null.
+ * the charset for the resource. If {@code null}, use {@code
UTF-8}.
* @param format
* the CSVFormat used for CSV parsing. Must not be null.
* @return a new parser
@@ -194,7 +194,6 @@ public final class CSVParser implements
*/
public static CSVParser parse(final URL url, final Charset charset, final
CSVFormat format) throws IOException {
Assertions.notNull(url, "url");
- Assertions.notNull(charset, "charset");
Assertions.notNull(format, "format");
return new CSVParser(new InputStreamReader(url.openStream(),