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

CSVPrinter ill-suited in multithreaded environment

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.10.0
    • None
    • None

    Description

      CSVPrinter doesn't support multiple threads writing to the same appendable. The class itself is not thread safe and, what's worse, it also invalidates any thread-safety guarantees provided by the underlying appendable, as in one CSVPrinter.print method there are multiple calls to out.append.

      OpenCSV does better here: in CSVWriter.writeNext there is one single call to PrintWriter.writer, thus it conveniently propagates PrintWriter thread-safety.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sandris Andras Sereny
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: