mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 11:29:28 +07:00
Ref-returning methods are not included into eq-classes, only variable state is tracked for them. Primitive-returning methods are handled like normal variables (their result is considered to be stable) Fixes IDEA-141547 ConstantConditions inspection reports false positive when using non getter method
16 lines
578 B
Java
16 lines
578 B
Java
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
|
|
class Foo {
|
|
@Nullable static Object foo() { return null; }
|
|
static String bar(@NotNull Object arg) { return ""; }
|
|
}
|
|
class Bar {
|
|
public static final String s = Foo.bar(<warning descr="Argument 'Foo.foo()' might be null">Foo.foo()</warning>);
|
|
@NotNull public static Object o = Foo.foo();
|
|
|
|
}
|
|
class Baz {
|
|
@NotNull public static Object o = <warning descr="Expression 'Foo.foo()' might evaluate to null but is assigned to a variable that is annotated with @NotNull">Foo.foo()</warning>;
|
|
} |