hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Appy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18878) Use Optional instead of Nullable annotation in ObserverContext to better describe that the caller may not be presented
Date Wed, 04 Oct 2017 00:14:00 GMT

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

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

bq. For now either you need to dig deeply to see if it could be null, or you need null check
everywhere which makes the code ugly...
i feel you. 
Found [a blog|https://blog.codefx.org/java/stephen-colebourne-optional-a-strict-approach/#Basic-Points]
which questions these general guidelines i.e.no optional in parameters, or class fields.
Let's discuss what path to pick after you're back. 
----
Filed HBASE-18931 for making ObserverContext interface as a separate task.
----
In meantime, can we at least get the latest patch (HBASE-18878.master.001.patch) committed
since it's making 8 functions return optionals. [~stack]?
I'll make [~Apache9] as author since it's subset of his patch.
And the remaining work is tracked by : HBASE-18926 and HBASE-18931



> 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)

Mime
View raw message