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

CSVRecord is not Serializable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: None
    • Labels:
      None

      Description

      CSVRecord is no longer Serializable as it stores the CSVParser and that is not serializable.

      The parser contains a list of all the CSVRecords. So to serialize this would serialize a lot of extra information. The cascade of serialization eventually includes the original BufferedReader used to read the data.

      The parser is required for the header map functionality and the getParser() method. The easy fix is to not support any functionality related to the parser after deserialization. If the header map functionality is to be supported the class can store the header map (easy), or overload the serialization methods to record and load the header map (more effort), or something else.

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                aherbert Alex Herbert
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: