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

CSVRecord inconsistent behaviour when header mapping is not found

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      The CSVRecord#get(String) method has inconsistent behaviour.

      If no header mapping was provided, then it throws IllegalStateException.
      If the header name is not found, null is returned.

      Apart from being inconsistent, it might be useful in the future to be able to return null as a column value (as distinct from the empty string).

      It should throw IllegalArgumentException for a missing header name, instead of returning null.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: