You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2014/07/15 20:02:02 UTC
svn commit: r1610786 - /commons/proper/csv/trunk/src/site/xdoc/user-guide.xml
Author: britter
Date: Tue Jul 15 18:02:02 2014
New Revision: 1610786
URL: http://svn.apache.org/r1610786
Log:
Use StandardCharsets class in user guide code examples, since it is more save than passing a string
Modified:
commons/proper/csv/trunk/src/site/xdoc/user-guide.xml
Modified: commons/proper/csv/trunk/src/site/xdoc/user-guide.xml
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/site/xdoc/user-guide.xml?rev=1610786&r1=1610785&r2=1610786&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/site/xdoc/user-guide.xml (original)
+++ commons/proper/csv/trunk/src/site/xdoc/user-guide.xml Tue Jul 15 18:02:02 2014
@@ -40,7 +40,7 @@ for (CSVRecord record : records) {
</p>
<source>final URL url = ...;
try (
- final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), "UTF-8");
+ final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), StandardCharsets.UTF_8);
final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
) {
for (final CSVRecord record : parser) {