commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COLLECTIONS-223) CollectionUtils.addAll() methods should return the input collection
Date Wed, 15 Aug 2007 05:47:30 GMT

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

Henri Yandell commented on COLLECTIONS-223:
-------------------------------------------

If you have a method of return type void, and you switch it without recompiling to a method
that returns something different, you'll get the following error at runtime:

Exception in thread "main" java.lang.NoSuchMethodError: backcompat.Library.doFoo(Ljava/lang/String;)V
        at backcompat.Test.main(Test.java:6)

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


Mime
View raw message