commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (LANG-1435) ObjectUtils.defaultIfNull for slow default values
Date Fri, 01 Mar 2019 17:13:00 GMT


ASF GitHub Bot logged work on LANG-1435:

                Author: ASF GitHub Bot
            Created on: 01/Mar/19 17:12
            Start Date: 01/Mar/19 17:12
    Worklog Time Spent: 10m 
      Work Description: chtompki commented on pull request #408: LANG-1435: Implemented defaultIfNull
method that uses a supplier for default value
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 206532)
    Time Spent: 50m  (was: 40m)

> ObjectUtils.defaultIfNull for slow default values
> -------------------------------------------------
>                 Key: LANG-1435
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Dekel
>            Priority: Minor
>   Original Estimate: 0.5h
>          Time Spent: 50m
>  Remaining Estimate: 0h
> Currently, if the default value in defaultIfNull is computationally slow (for example,
it requires a database call, or complex calculations), it's not worth using the util method.
This feature is to implement a method that would only perform this computationally slow action
if the object value is actually null. This can be done using a Supplier.
> In short, you'd call ObjectUtils.getDefaultIfNull(someNullableValue, DbUtil::doGet) instead
of ObjectUtils.defaultIfNull(someNullableValue, DbUtil.doGet()) 

This message was sent by Atlassian JIRA

View raw message