You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "JiangHua Zhu (Jira)" <ji...@apache.org> on 2024/10/29 09:55:00 UTC
[jira] [Created] (RATIS-2180) Unified judgment object is not null
JiangHua Zhu created RATIS-2180:
-----------------------------------
Summary: 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
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)