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 2020/01/08 08:16:00 UTC

[jira] [Work logged] (LANG-1513) ObjectUtils: Get first non-null supplier value

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

ASF GitHub Bot logged work on LANG-1513:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Jan/20 08:15
            Start Date: 08/Jan/20 08:15
    Worklog Time Spent: 10m 
      Work Description: bonii-xx commented on pull request #484: LANG-1513 ObjectUtils: Get first non-null supplier value
URL: https://github.com/apache/commons-lang/pull/484
 
 
   
 
----------------------------------------------------------------
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: 368054)
    Time Spent: 50m  (was: 40m)

> ObjectUtils: Get first non-null supplier value
> ----------------------------------------------
>
>                 Key: LANG-1513
>                 URL: https://issues.apache.org/jira/browse/LANG-1513
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Bernhard Bonigl
>            Priority: Major
>             Fix For: 3.10
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Add {{org.apache.commons.lang3.ObjectUtils.getFirstNonNull(Supplier<T>...)}}
> ----
> {{\ObjectUtils.firstNonNull}} takes values, and returns the first non null. This is often used when multiple options have to be tried one after another.
> When each option is expensive to compute, you don't want to calculate them all beforehand, but only evaluate them when needed. For this I propose {{firstNonNullLazy}}, which takes a Supplier and only evaluates the value if it needs to be checked.



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