You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Anson Schwabecher (JIRA)" <ji...@apache.org> on 2018/05/19 06:26:00 UTC
[jira] [Updated] (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 ]
Anson Schwabecher updated CSV-225:
----------------------------------
Description:
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);}}
{{}}}
was:
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);}}
{{}}}
> 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)