mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 18:13:36 +07:00
for "Null check can be replaced with method call" inspection GitOrigin-RevId: ffa45cce88afb341cdeb9a49d4ee256251865bfc
13 lines
248 B
Java
13 lines
248 B
Java
// "Replace 'if' statement with 'Objects.requireNonNullElseGet()' call" "INFORMATION"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
public Object test(Object o) {
|
|
if<caret>(o == null) {
|
|
return new Object();
|
|
} else {
|
|
return o;
|
|
}
|
|
}
|
|
} |