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

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

But what happens in your example if {{foo}} is a variable and is {{null}}? 
Could {{foo}} also be an {{Optional}} instance?
I think the shortcut looks nice, but I'm not convinced it can be implemented 
without inconsistencies. 

I also think the idea of {{Optional}} is to provide some additional semantics. 
If someone is happy using the shortcuts in queries then they should probably 
use the same shortcuts in Java. It also means that they are probably not 
interested in the additional semantics and should probably not use {{Optional}} 
in the first place. Would you agree?



> 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