You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/05/19 16:07:00 UTC
[jira] [Resolved] (CSV-225) Parse method should avoid creating a
redundant BufferedReader
[ https://issues.apache.org/jira/browse/CSV-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory resolved CSV-225.
------------------------------
Resolution: Fixed
Fixed in git master. Please verify and close this ticket and associated PR.
> Parse method should avoid creating a redundant BufferedReader
> -------------------------------------------------------------
>
> Key: CSV-225
> URL: https://issues.apache.org/jira/browse/CSV-225
> Project: Commons CSV
> Issue Type: Improvement
> Components: Parser
> Affects Versions: 1.5
> Reporter: Anson Schwabecher
> Priority: Minor
> Fix For: 1.6
>
>
> A redundant BufferedReader is created as the inner reader of ExtendedBufferedReader when the CSVParser is created with:
> {{CSVParser#parse(Path, Charset, CSVFormat)}}
> Simply change over from {{Files#newBufferedReader to Files#newInputStream}}
>
> {{public static CSVParser parse(final Path path, final Charset charset, final CSVFormat format) throws IOException {}}
> {{ Assertions.notNull(path, "path");}}
> {{ Assertions.notNull(format, "format");}}
> {{ return parse(Files.newInputStream(path), charset, format);}}
> {{}}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)