[
https://issues.apache.org/jira/browse/COLLECTIONS-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Neidhart resolved COLLECTIONS-319.
-----------------------------------------
Resolution: Fixed
> IteratorUtils.getIterator(Object obj) performs redundant null check
> -------------------------------------------------------------------
>
> Key: COLLECTIONS-319
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-319
> Project: Commons Collections
> Issue Type: Bug
> Components: Collection
> Reporter: Sebb
> Priority: Minor
> Fix For: 4.0
>
>
> IteratorUtils.getIterator(Object obj) performs redundant null check:
> {code}
> if (obj == null) {
> return emptyIterator();
> ...
> } else if (obj != null && obj.getClass().isArray()) {
> return new ArrayIterator(obj);
> {code}
> obj cannot be null at that point, so the check can be removed.
> [This will also prevent a false positive in Eclipse which later says tha obj
> may be null]
--
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