mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 04:07:30 +07:00
for "Null check can be replaced with method call" inspection GitOrigin-RevId: ffa45cce88afb341cdeb9a49d4ee256251865bfc
19 lines
314 B
Java
19 lines
314 B
Java
// "Replace conditional expression with 'Objects.requireNonNullElse()' call" "true"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
void work(Object o) {
|
|
|
|
}
|
|
|
|
public void test(Object o) {
|
|
/*2*/
|
|
/*3*/
|
|
/*4*/
|
|
/*5*/
|
|
/*6*/
|
|
/*7*/
|
|
work(/*1*/Objects.requireNonNullElse(o, "")/*8*/);
|
|
}
|
|
} |