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

JiangHua Zhu commented on RATIS-2180:
-------------------------------------

I think we should unify it and use Preconditions.assertNotNull().
[~szetszwo], what do you think?


> 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