mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 12:48:12 +07:00
for "Null check can be replaced with method call" inspection GitOrigin-RevId: ffa45cce88afb341cdeb9a49d4ee256251865bfc
17 lines
476 B
Java
17 lines
476 B
Java
// "Replace conditional expression with 'Objects.requireNonNullElseGet()' call" "INFORMATION"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
static class M {
|
|
Object getCodeCache(){return new Object();}
|
|
}
|
|
|
|
static M getProviders() {
|
|
return new M();
|
|
}
|
|
|
|
static void test(Object context[], Object method, Object compilationResult) {
|
|
Object[] debugContext = (context != null) ? context :<caret> new Object[]{getProviders().getCodeCache(), method, compilationResult};
|
|
}
|
|
} |