[
https://issues.apache.org/jira/browse/CSV-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15019273#comment-15019273
]
Romain Manni-Bucau commented on CSV-164:
----------------------------------------
@Gary: I didnt invent this format - I just cant share the actual header names.
This is a big (very expensive) system doing an export after some custom
querying/extraction. The output headers contains duplicates. If you supply
headers (withHeader()) you end up in the same validate() method which makes the
call failling - this is what I do actually.
Current code uses jsefa which supports it - it doesn't use name indexation at
all. I am not sure to follow why [csv] can't support index access - which is
the only valid for CSV actually - and header usage as a nice higher level API
instead - which means this last one can hit this issue.
Side note: you can easily get the exact same issue with excel exports and you
can't argue to everybody that their inputs are just garbage - not saying that I
disagree, just that i think real life here is stronger than what we can think.
> support duplicate headers
> -------------------------
>
> Key: CSV-164
> URL: https://issues.apache.org/jira/browse/CSV-164
> Project: Commons CSV
> Issue Type: Bug
> Reporter: Romain Manni-Bucau
>
> nothing prevents a CSV to have the same time the same header name so
> validation at the end of org.apache.commons.csv.CSVFormat#validate should
> likely disappear or should support a flag to disable it
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)