You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/08/23 21:40:51 UTC
commons-csv git commit: org.apache.commons.csv.CSVFormat.print(Path,
Charset) should use NIO and not convert the Path to a File.
Repository: commons-csv
Updated Branches:
refs/heads/master 5e9d2240a -> f7328ef02
org.apache.commons.csv.CSVFormat.print(Path, Charset) should use NIO and
not convert the Path to a File.
Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/f7328ef0
Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/f7328ef0
Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/f7328ef0
Branch: refs/heads/master
Commit: f7328ef02c1825a60b8a81f7583cf8ef948c2d92
Parents: 5e9d224
Author: Gary Gregory <gg...@apache.org>
Authored: Tue Aug 23 14:40:49 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Tue Aug 23 14:40:49 2016 -0700
----------------------------------------------------------------------
src/main/java/org/apache/commons/csv/CSVFormat.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f7328ef0/src/main/java/org/apache/commons/csv/CSVFormat.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java
index eee099d..44801f9 100644
--- a/src/main/java/org/apache/commons/csv/CSVFormat.java
+++ b/src/main/java/org/apache/commons/csv/CSVFormat.java
@@ -36,6 +36,7 @@ import java.io.Reader;
import java.io.Serializable;
import java.io.StringWriter;
import java.nio.charset.Charset;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
@@ -907,7 +908,7 @@ public final class CSVFormat implements Serializable {
* @since 1.5
*/
public CSVPrinter print(final Path out, Charset charset) throws IOException {
- return print(out.toFile(), charset);
+ return print(Files.newBufferedWriter(out, charset));
}
/**