Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
CollectionUtils.size(Object object) has impossible null check:
public static int size(Object object) { if (object == null) { return 0; } ... } else if (object == null) { throw new IllegalArgumentException("Unsupported object type: null"); ...
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.