mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Precise nullability reporting: test-data fixed (IDEA-CR-40527)
This commit is contained in:
@@ -11,6 +11,6 @@ class Npe {
|
||||
}
|
||||
|
||||
void bar() {
|
||||
Object o = foo(<warning descr="Argument '(Object)nullable()' might be null">(Object)nullable()</warning>); // null should not be passed here.
|
||||
Object o = foo((Object)<warning descr="Argument 'nullable()' might be null">nullable()</warning>); // null should not be passed here.
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class Foo {
|
||||
void main() {
|
||||
foo(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">(String) null</warning>);
|
||||
foo((String) <warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>);
|
||||
}
|
||||
|
||||
static void foo(@NotNull String s) {}
|
||||
|
||||
@@ -26,7 +26,7 @@ class Test {
|
||||
Object x = null;
|
||||
doNotNull(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">x</warning>);
|
||||
x = null;
|
||||
doNotNull(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">(x)</warning>);
|
||||
doNotNull((<warning descr="Passing 'null' argument to parameter annotated as @NotNull">x</warning>));
|
||||
}
|
||||
|
||||
@NotNull Object testReturn(Object x1, Object x2) {
|
||||
|
||||
Reference in New Issue
Block a user