You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shenyu.apache.org by 1920731406 <19...@qq.com.INVALID> on 2022/03/25 06:53:34 UTC

Modify a logic that determines whether a parameter is null

The original code:
if (log == null || logCollectClient == null){
...........
}
The improved scheme:
if (Objects.isNull(log) || Objects.isNull(logCollectClient)){
.............
}

Re: Modify a logic that determines whether a parameter is null

Posted by XiaoYu <xi...@apache.org>.
hi 1920731406

it good idea,

Looking forward to your pull request~

1920731406 <19...@qq.com.invalid> 于2022年3月25日周五 14:53写道:
>
> The original code:
> if (log == null || logCollectClient == null){
> ...........
> }
> The improved scheme:
> if (Objects.isNull(log) || Objects.isNull(logCollectClient)){
> .............
> }