mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 15:53:38 +07:00
for "Null check can be replaced with method call" inspection GitOrigin-RevId: ffa45cce88afb341cdeb9a49d4ee256251865bfc
9 lines
219 B
Java
9 lines
219 B
Java
// "Replace 'if' statement with 'Objects.requireNonNullElseGet()' call" "INFORMATION"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
public Object test(Object o) {
|
|
return Objects.requireNonNullElseGet(o, Object::new);
|
|
}
|
|
} |