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] Updated: (COLLECTIONS-230) CollectionUtils.size(null) should return 0
Date Wed, 15 Aug 2007 05:29:30 GMT

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

Henri Yandell updated COLLECTIONS-230:
--------------------------------------

    Fix Version/s: 3.3

Sounds good to me. Any reasons not to?

> CollectionUtils.size(null) should return 0
> ------------------------------------------
>
>                 Key: COLLECTIONS-230
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-230
>             Project: Commons Collections
>          Issue Type: Wish
>    Affects Versions: 3.2
>            Reporter: Stepan Koltsov
>             Fix For: 3.3
>
>
> Hello,
> CollectionUtils.size(null) currently throws IllegalArgumentException("Unsupported object
type: null"). I think CollectionUtils.size(null) should return 0.
> Why?
> The aim of library is to minimize the amount of code that uses this library. In my experience,
in the most cases null collections can be threated as as zero-length. Current behavior causes
the need of many trivial null-checks.

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