You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/26 19:54:00 UTC

[jira] [Work logged] (COLLECTIONS-783) Checks if any value in the given Collections is null or empty.

     [ https://issues.apache.org/jira/browse/COLLECTIONS-783?focusedWorklogId=558709&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-558709 ]

ASF GitHub Bot logged work on COLLECTIONS-783:
----------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Feb/21 19:53
            Start Date: 26/Feb/21 19:53
    Worklog Time Spent: 10m 
      Work Description: arturobernalg commented on pull request #216:
URL: https://github.com/apache/commons-collections/pull/216#issuecomment-786860741


   > Code looks OK. I think we just need to consider whether we want a new method for this, or if existing ways to use the code for this are better alternatives (easier maintenance having less methods).
   > 
   > ```java
   > List<String> l = Arrays.asList("a", "b", "c", "");
   > 
   > boolean b = CollectionUtils.containsAny(l, new Object[] { null, "" }); // or
   > boolean b = IterableUtils.matchesAny(l, (e) -> e == null || "".equals(e));
   > ```
   > 
   > This is similar to [lang]'s `isAnyEmpty`, but instead of a chain of characters, we check the array of objects. But probably we don't want a `isAnyBlank` (`" "` is blank, not empty).
   > 
   > And this one would need a JIRA issue @arturobernalg but we can wait for others to chime in and take a look at the new code first before creating one if you'd like.
   > 
   > Thanks for the PR's!
   > Bruno
   
   Hi @kinow 
   
   Jira created COLLECTIONS-783.
   
   I will check your comment and analyze what can we reuse and what will the  best alternative. Thank you very much 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 558709)
    Remaining Estimate: 0h
            Time Spent: 10m

> Checks if any value in the given Collections is null or empty.
> --------------------------------------------------------------
>
>                 Key: COLLECTIONS-783
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-783
>             Project: Commons Collections
>          Issue Type: Improvement
>            Reporter: Arturo Bernal
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> |Checks if any value in the given Collections is null or empty. Return true if there is at least one null value in the Collection, and return false if all the values are non-null and not empty.|
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)