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

Appy commented on HBASE-18878:
------------------------------

Oh, i am sorry, i never refreshed my browser between comments. I wasn't 
expecting replies you see. :)  Go back to enjoying your holidays!! :P  :D

bq. And I’m not fully convinced by the reason that why Optional should not be 
used as a parameter
Me neither. But am not expert on jdk8 yet, so i too took the path of 
conventional wisdom. 

bq. I’ve already used lots of Optional parameters in the code.
Once you're back, we can hunt them together. 

bq. Any way, let’s instead adding Nullable annotations to indicate that a 
parameter could be null? My experience is that it is really a pain that we do 
not know if a variable could be null or not when implementing a class, 
especially if it is used everywhere in the class... Doing Null check everywhere 
but missing at some places is really confusing...

Absolutely with you on this. But which @Nullable. There are quite a few in the 
market. Let me defer the decision making on that to when you are back and at 
least keep making progress on returning Optional<T> instead of T.

Filed a jira for cleanup of previously added Optional<T> in method params.  
HBASE-18926

> Use Optional instead of Nullable annotation in ObserverContext to better 
> describe that the caller may not be presented
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-18878
>                 URL: https://issues.apache.org/jira/browse/HBASE-18878
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>             Fix For: 2.0.0-alpha-4
>
>         Attachments: HBASE-18878.master.001.patch, HBASE-18878.patch, 
> HBASE-18878-v1.patch
>
>
> I've already done lots of Nullable to Optional change when purging the 
> interfaces for CP. This is a big one so open a separated issue for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to