commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CSV-96) CSVRecord does not verify that the length of the header mapping matches the number of values
Date Thu, 14 Aug 2014 20:08:28 GMT

     [ https://issues.apache.org/jira/browse/CSV-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedikt Ritter closed CSV-96.
------------------------------


> CSVRecord does not verify that the length of the header mapping matches the number of
values
> --------------------------------------------------------------------------------------------
>
>                 Key: CSV-96
>                 URL: https://issues.apache.org/jira/browse/CSV-96
>             Project: Commons CSV
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 1.0
>            Reporter: Benedikt Ritter
>             Fix For: 1.0
>
>
> CSVRecord does not verify that the size of the header mapping matches the number of values.
The following test will produce a ArrayOutOfBoundsException:
> {code}
> @Test
> public void testInvalidHeaderTooLong() throws Exception {
>    final CSVParser parser = new CSVParser("a,b", CSVFormat.newBuilder().withHeader("A",
"B", "C").build());
>    final CSVRecord record = parser.iterator().next();
>    record.get("C");
> }
> {code}



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

Mime
View raw message