Files
Bas Leijdekkersandintellij-monorepo-bot e5caa802af Java: improve inspection messages
for "Null check can be replaced with method call" inspection

GitOrigin-RevId: ffa45cce88afb341cdeb9a49d4ee256251865bfc
2022-07-22 18:35:53 +00:00

18 lines
337 B
Java

// "Replace 'if' statement with 'Objects.requireNonNullElse()' call" "GENERIC_ERROR_OR_WARNING"
import java.util.*;
class Util {
String method(String s) {return s;}
}
class Test {
public void test(String o) {
Object another;
if<caret>(o == null) {
Util.method("Hello");
} else {
Util.method(o);
}
}
}