mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
Fixes IDEA-281445 Nullability annotation does not work on method references! Oh no! GitOrigin-RevId: b7b70ef1019711bb5fde88c5e1c900128b6a3d0b
16 lines
348 B
Java
16 lines
348 B
Java
import java.util.function.*;
|
|
import typeUse.*;
|
|
|
|
interface Bug {
|
|
static void test() {
|
|
f(<warning descr="Method reference argument might be null">Bug::g</warning>);
|
|
}
|
|
|
|
static void f(@NotNull Consumer<@Nullable String> function) {
|
|
function.accept(null);
|
|
}
|
|
|
|
static void g(@NotNull String s) {
|
|
System.out.println(s.length());
|
|
}
|
|
} |