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

Tilmann Zäschke commented on JDO-751:
-------------------------------------

{quote}
{{Optional.get}} will never give you back a {{null}}, it raises an 
{{NoSuchElementException}}
{quote}
Ah, I hadn't realized that, that explains some things.

{quote}
Once using Optional everything that is non-Optional is automatically assumed to 
be non-nullable. You need to pick one approach and delimit this world well.
{quote}
I'm with you here, my concern was only that people are free to use {{null}} 
outside {{Optional}}, and I think we need to make sure that we cover this (i.e. 
think about it, not necessarily allow it), because it's perfectly valid Java, 
even if it is not obviously sensible or what they 'should' do.

> Support for Java8 Optional
> --------------------------
>
>                 Key: JDO-751
>                 URL: https://issues.apache.org/jira/browse/JDO-751
>             Project: JDO
>          Issue Type: New Feature
>          Components: specification, tck
>            Reporter: Andy Jefferson
>
> java.util.Optional provides a feature that is available in other languages. 
> Since JDO 3.2 will be for Java8+ then it makes sense to add support for this 
> as a "supported persistable type"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to