kinow commented on code in PR #249:
URL: https://github.com/apache/commons-csv/pull/249#discussion_r941764572


##########
src/main/java/org/apache/commons/csv/CSVRecord.java:
##########
@@ -298,13 +299,14 @@ public Stream<String> stream() {
     }
 
     /**
-     * Converts the values to a List.
+     * Converts the values to a new {@code List}.<br>
+     * Modifications to the list do not alter this record.
      *
-     * @return a new List
+     * @return a new {@code List}
      * @since 1.9.0
      */
     public List<String> toList() {
-        return Arrays.asList(values);
+        return new ArrayList<>(Arrays.asList(values));

Review Comment:
   (Also needs to update the javadocs as mentioned in the JIRA comment too, and 
needs unit tests as pointed below by @garydgregory :+1: )



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

Reply via email to