commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (LANG-1411) Add isEmpty method to ObjectUtils
Date Fri, 17 Aug 2018 09:34:00 GMT


ASF GitHub Bot commented on LANG-1411:

Github user kinow commented on the issue:
    Hi @nictas , thanks for your contribution. The code looks really good, well commented
and formatted with unit tests. :clap: :clap: 
    And you seem to have a valid use case for it. I think I could even get used to calling
this method in some of my projects.
    Leaving my +1 here, but leaving it for others to review. Would be especially good someone
with more time to confirm we don't have anything similar, or that could be chained, etc, I
    Thank you again

> Add isEmpty method to ObjectUtils
> ---------------------------------
>                 Key: LANG-1411
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Alexander Tsvetkov
>            Priority: Major
> In Spring's [org.springframework.util.ObjectUtils|] there's
a null-safe [isEmpty method|] that
checks whether an object is empty based on its type. If the object is a string it calls String.isEmpty,
if it's a collection it calls Collection.isEmpty, etc. I think a similar method would be a
really nice addition to org.apache.commons.lang3.ObjectUtils, as it would allow people like
me to use it without adding a dependency to Spring or re-implementing the method in our code.

This message was sent by Atlassian JIRA

View raw message