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

Parse method should avoid creating a redundant BufferedReader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5
    • 1.6
    • Parser
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: