Menu

#162 "Header is missing required fields" Message

v1.0 (example)
closed-fixed
None
5
2017-12-08
2017-11-26
JD Reddaway
No

In HeaderColumnNameMappingStrategy.captureHeader(), line 119 checks that !requiredKeys.isEmpty(). Then, on line 126, it does builder.appendWithSeparators(requiredKeys, ","). Because of the check on line 119, requiredKeys will always have a single element. It would be better (and I think it was intended) to have all required headers that were missing.

In addition, can you please include the headers from the CSV? It would be helpful for debugging why it didn't find the header(s).

Discussion

  • JD Reddaway

    JD Reddaway - 2017-11-26

    Sorry, it's late, and I'm wrong. The first paragraph works as intended -- requiredKeys could still have multiple values. But would you mind adding the the header array to the error message?

     
  • Andrew Rucker Jones

    • status: open --> closed-fixed
    • assigned_to: Andrew Rucker Jones
     
  • Andrew Rucker Jones

    I added the list of headers to the error message. It will be released in 4.2.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.