Uploaded image for project: 'Commons CSV'
  1. Commons CSV
  2. CSV-225

Parse method should avoid creating a redundant BufferedReader

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: Parser
    • Labels:
      None

      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);
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aeschwabe Anson Schwabecher
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: