[ 
https://issues.apache.org/jira/browse/COLLECTIONS-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526943
 ] 

Vasily Ivanov commented on COLLECTIONS-223:
-------------------------------------------

Hi Alan,

I know I can do this:
ArrayList list = new ArrayList();
CollectionUtils.addAll(list, new String[] { "value1", "value2" }); 

The only reason I want this change is to use one-liners like this:
Collection col = CollectionUtils.addAll(new ArrayList(), new String[] { 
"value1", "value2" }); 

you know... like MapUtils.putAll() does

but I understand backwards compatibility issue, no drama

> CollectionUtils.addAll() methods should return the input collection
> -------------------------------------------------------------------
>
>                 Key: COLLECTIONS-223
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-223
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 3.2
>            Reporter: Vasily Ivanov
>            Priority: Minor
>             Fix For: 4.0
>
>
> Like MapUtils.putAll() method returns input map, CollectionUtils.addAll() 
> methods should return the input collection.
> This will allow to init and populate collection at the same line:
> ArrayList inputs = (ArrayList) CollectionUtils.addAll(new ArrayList(), new 
> String[] { "value1", "value2" });

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to