Skip to content

Commit c473d87

Browse files
committed
The charset can be null and will default to UTF-8.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578191 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7b8cc87 commit c473d87

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/org/apache/commons/csv/CSVParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public static CSVParser parse(final String string, final CSVFormat format) throw
183183
* @param url
184184
* a URL. Must not be null.
185185
* @param charset
186-
* the charset for the resource. Must not be null.
186+
* the charset for the resource. If {@code null}, use {@code UTF-8}.
187187
* @param format
188188
* the CSVFormat used for CSV parsing. Must not be null.
189189
* @return a new parser
@@ -194,7 +194,6 @@ public static CSVParser parse(final String string, final CSVFormat format) throw
194194
*/
195195
public static CSVParser parse(final URL url, final Charset charset, final CSVFormat format) throws IOException {
196196
Assertions.notNull(url, "url");
197-
Assertions.notNull(charset, "charset");
198197
Assertions.notNull(format, "format");
199198

200199
return new CSVParser(new InputStreamReader(url.openStream(),

0 commit comments

Comments
 (0)