[
https://issues.apache.org/jira/browse/CSV-264?focusedWorklogId=618796&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-618796
]
ASF GitHub Bot logged work on CSV-264:
--------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jul/21 20:47
Start Date: 05/Jul/21 20:47
Worklog Time Spent: 10m
Work Description: garydgregory commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-874321915
@SethFalco
Please accept my apologieses for the delay in further reviewing this PR.
I feel there is something important missing here:
- What happens/should happen for each enum value when you call
`CSVRecord.get(String)`.
- What happens/should happen for each enum value when you call
`CSVRecord.toMap()`.
For example, if duplicate headers are allowed, does the first column win?
Should it? Does the last column win? Certainly, it should not be random or
undocumented.
Also, would you mind rebasing on master please? I've recently deprecated the
`with` methods in favor of a Builder. New settings should be added through the
Builder, not `with` methods.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 618796)
Time Spent: 2.5h (was: 2h 20m)
> Duplicate empty header names are allowed even with
> `.withAllowDuplicateHeaderNames(false)`
> ------------------------------------------------------------------------------------------
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
> Issue Type: Bug
> Components: Parser
> Affects Versions: 1.8
> Reporter: Sagar Tiwari
> Priority: Major
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>
> One would expect this code to throw an error if the following csv is given as
> input:
>
>
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>
> But it doesn't, and asking for `record.get("")` gives the value from the
> second column. The first column is ignored.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)