[ 
https://issues.apache.org/jira/browse/COLLECTIONS-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart reopened COLLECTIONS-318:
-----------------------------------------

    
> CollectionUtils.size(Object object) has impossible null check
> -------------------------------------------------------------
>
>                 Key: COLLECTIONS-318
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-318
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Collection
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 4.0
>
>
> CollectionUtils.size(Object object) has impossible null check:
> {code}
>     public static int size(Object object) {
>         if (object == null) {
>             return 0;
>         }
> ...
>         } else if (object == null) {
>             throw new IllegalArgumentException("Unsupported object type: 
> null");
> ...
> {code}
> The Javadoc specifically says that null is allowed, so I think the object == 
> null clause needs to be removed - it can never be true, and is just confusing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to