[ 
https://issues.apache.org/jira/browse/SOLR-14846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17192899#comment-17192899
 ] 

ASF subversion and git services commented on SOLR-14846:
--------------------------------------------------------

Commit c902837bb237e579f9fdd0db0a8b35680b294ad1 in lucene-solr's branch 
refs/heads/master from Mike Drob
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=c902837 ]

SOLR-14846 Clean up Optional use (#1843)

* Remove Optional.ofNullable.orElse pattern
* Remove use of Optional as method parameter

> Avoid use of Optional.ofNullable.orElse in the same line
> --------------------------------------------------------
>
>                 Key: SOLR-14846
>                 URL: https://issues.apache.org/jira/browse/SOLR-14846
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Mike Drob
>            Assignee: Mike Drob
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Optional was meant to be used in public APIs to convey to the caller that 
> they really need to null-check, not as an internal class to avoid doing our 
> own null checks. There are better methods in {{Objects}} for that if we want 
> them.
> See also Brian Goetz at JavaOne - https://youtu.be/MFzlgAuanU0?t=2719



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to