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

Gary Gregory commented on CSV-121:
----------------------------------

I Added the format setting {{ignoreEmptyHeaders}}, which defaults to false to 
keep the IAE as the default behavior.

{noformat}
commit -m "[CSV-121] Exception that the header contains duplicate names when 
the column names are empty. Added the setting ignoreEmptyHeaders, defaults to 
false to keep the IAE as the default behavior." 
C:/vcs/svn/apache/commons/trunks-proper/csv/src/test/java/org/apache/commons/csv/CSVParserTest.java
 
C:/vcs/svn/apache/commons/trunks-proper/csv/src/main/java/org/apache/commons/csv/CSVFormat.java
 
C:/vcs/svn/apache/commons/trunks-proper/csv/src/main/java/org/apache/commons/csv/CSVParser.java
 C:/vcs/svn/apache/commons/trunks-proper/csv/src/changes/changes.xml
    Sending        
C:/vcs/svn/apache/commons/trunks-proper/csv/src/changes/changes.xml
    Sending        
C:/vcs/svn/apache/commons/trunks-proper/csv/src/main/java/org/apache/commons/csv/CSVFormat.java
    Sending        
C:/vcs/svn/apache/commons/trunks-proper/csv/src/main/java/org/apache/commons/csv/CSVParser.java
    Sending        
C:/vcs/svn/apache/commons/trunks-proper/csv/src/test/java/org/apache/commons/csv/CSVParserTest.java
    Transmitting file data ...
    Committed revision 1602206.
{noformat}


> IllegalArgumentException thrown when the header contains duplicate names when 
> the column names are empty.
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CSV-121
>                 URL: https://issues.apache.org/jira/browse/CSV-121
>             Project: Commons CSV
>          Issue Type: Bug
>            Reporter: Sebastian Hardt
>             Fix For: 1.0
>
>
> When having a header like a,,c,d,, an IllegalArgumentException("The header 
> contains duplicate names: " +Arrays.toString(header) is thrown because empty 
> header names are treated as a header with name. I sended in a pullrequest at 
> github: https://github.com/apache/commons-csv/pull/2



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to