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

CSVFormat.duplicateHeaderMode requires default for backward compatibility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.x
    • None
    • Parser
    • None

    Description

      The member in class CSVFormat

      boolean allowDuplicateHeaderNames

       was recently replaced by 

      DuplicateHeaderMode duplicateHeaderMode

      The boolean defaults to false, while the member of type DuplicateHeaderMode defaults to null.

      duplicateHeaderMode must be initialized with DISALLOW for backward compatibility.

      The change is also problematic with regards to serialization. The class is serializable and serialVersionUID is unchanged between versions. The boolean setting allowDuplicateHeaderNames in an object serialized in version 1.9.0 or earlier would always be de-serialized to duplicateHeaderMode = null in the current head.

      To handle the code changes correctly, customized de-serialization would need to be implemented.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              spannjp Markus Spann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h