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

Clueless Joe commented on AVRO-1961:
------------------------------------

Thanks a lot for your answer. And don't forget I'm clueless, so it's all deeply 
open to discussion :)

I'll do a PR on your repo tomorrow night regarding the null part, so at least 
this part will be solved.

You're right to think of the transition We're using Avro at work and, to be 
honest, I was rather thinking of some breaking changes in our dev branches. A 
smoother transition would be great, but I don't see some currently. How would 
you  transition from the two getters (getFoo and getOptionalFoo) to the one 
Optional<Foo> getFoo() later on? 

For the setters, at least having both, with setFoo(Foo fooOrNull) and 
setFoo(Optional<Foo> foo), is doable code wise. Furthermore in the builder to 
have both seems handy. I would love to have more feedbacks on the matter 
actually, to know everyone's feeling.

Best
cluelessjoe

> [JAVA] Generate getters that return an Optional
> -----------------------------------------------
>
>                 Key: AVRO-1961
>                 URL: https://issues.apache.org/jira/browse/AVRO-1961
>             Project: Avro
>          Issue Type: New Feature
>            Reporter: Niels Basjes
>            Assignee: Niels Basjes
>            Priority: Minor
>
> A colleague of mine indicated that having getters that return an Optional 
> (java 8 thingy) would be very useful for him.



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

Reply via email to