You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "John Wagenleitner (JIRA)" <ji...@apache.org> on 2017/05/29 13:47:04 UTC
[jira] [Resolved] (GROOVY-7611) java.util.Optional should evaluate
to false if empty
[ https://issues.apache.org/jira/browse/GROOVY-7611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Wagenleitner resolved GROOVY-7611.
---------------------------------------
Resolution: Fixed
Assignee: John Wagenleitner
Fix Version/s: 2.5.0-beta-1
Thanks for improvement request.
> java.util.Optional should evaluate to false if empty
> ----------------------------------------------------
>
> Key: GROOVY-7611
> URL: https://issues.apache.org/jira/browse/GROOVY-7611
> Project: Groovy
> Issue Type: Improvement
> Affects Versions: 2.4.5
> Reporter: Christopher Smith
> Assignee: John Wagenleitner
> Priority: Minor
> Fix For: 2.5.0-beta-1
>
>
> In the spirit of the rest of the Groovy truth semantics, I suggest that an empty {{java.util.Optional}}, which is essentially a stream-safe equivalent of {{null}}, should evaluate to false: {{asBoolean()}} should simply delegate to {{isPresent()}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)