groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7611) java.util.Optional should evaluate to false if empty
Date Sat, 27 May 2017 21:08:04 GMT

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

ASF GitHub Bot commented on GROOVY-7611:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/groovy/pull/545


> 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
>            Priority: Minor
>
> 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)

Mime
View raw message