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

Tsz-wo Sze commented on RATIS-2180:
-----------------------------------

[~jianghuazhu], thanks for filing this JIRA!  Let's use Objects.requireNonNull 
instead of Preconditions.assertNotNull.  We should in favor of standard Java 
library.

> Unified judgment object is not null
> -----------------------------------
>
>                 Key: RATIS-2180
>                 URL: https://issues.apache.org/jira/browse/RATIS-2180
>             Project: Ratis
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.0.1
>            Reporter: JiangHua Zhu
>            Priority: Major
>
> In Ratis, there are now two ways to check if an object is not null.
> Use Preconditions.assertNotNull(). For example:
> {code:java}
> Preconditions.assertNotNull(getServerRpc(), "getServerRpc()");
> {code}
> Use Objects.requireNonNull(). For example:
> {code:java}
> Objects.requireNonNull(request, "request == null");
> {code}
> We should unify them.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to