[
https://issues.apache.org/jira/browse/CSV-300?focusedWorklogId=799660&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799660
]
ASF GitHub Bot logged work on CSV-300:
--------------------------------------
Author: ASF GitHub Bot
Created on: 10/Aug/22 09:11
Start Date: 10/Aug/22 09:11
Worklog Time Spent: 10m
Work Description: garydgregory commented on PR #249:
URL: https://github.com/apache/commons-csv/pull/249#issuecomment-1210388725
Hm, I don't see the point of a read only list. IMO if I convert the record
to a list, I should be able to do whatever I want with the list. If the list is
RO, then I have to make a copy to edit it which is counter intuitive and
wasteful. This is a toList() convert method and not a getList() access method
after all. The point of a list here IMO is that I can edit its size, unlike an
array.
Issue Time Tracking
-------------------
Worklog Id: (was: 799660)
Time Spent: 1.5h (was: 1h 20m)
> CSVRecord.toList() gives write access to private values array
> -------------------------------------------------------------
>
> Key: CSV-300
> URL: https://issues.apache.org/jira/browse/CSV-300
> Project: Commons CSV
> Issue Type: Bug
> Affects Versions: 1.9.0
> Reporter: Markus Spann
> Priority: Trivial
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> {{CSVRecord.toList()}} converts the values to a list by calling
> {{Arrays.asList}} which writes to the private array in calls to
> {{{}Arrays.ArrayList.set(int, E){}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)