Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Please take a look at:
https://stackoverflow.com/questions/580160/how-to-convert-a-collection-to-list
Add a utility method to convert a Collection to a List, returning the argument if it is a List subclass itself. Make the return type Unmodified for consistency.since if the data comes in as a non-List class, then a copy is made, so modifying the returned collection would not affect the original source, whereas if a List is passed in, modification to the returned List would impact the original source.