[ 
https://issues.apache.org/jira/browse/CSV-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15019194#comment-15019194
 ] 

Romain Manni-Bucau commented on CSV-164:
----------------------------------------

If you see the header as a key to access the entries the key is actually the 
position.

I know CSVRecord.get("header") would suffer from it.

My proposal is:

- keep current logic *by default*
- keep track of duplicated records if a flag is set 
(supportsDuplicatedHeaders?) - note: can log a warning
- if CSVRecord.get(aDuplicatedHeader) is called then throw an exception

Allows to use CSVRecord.get(index) without issues

wdyt?

> 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)

Reply via email to