mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 11:44:39 +07:00
Fixes IDEA-372347 Java type inference should respect nullability Fixes IDEA-368244 Unexpected warnings when using @Nullable generic type bounds in @NullMarked context Fixes IDEA-372223 Nullability inference for generic parameters Fixes IDEA-367232 'Argument might be null' warning on JSpecify nullable enum GitOrigin-RevId: 12745f82e22fadb35e23ad73f330501146c86b86
21 lines
425 B
Java
21 lines
425 B
Java
import org.jetbrains.annotations.NotNull;
|
|
import java.util.function.Supplier;
|
|
|
|
class TestTest {
|
|
public void test() {
|
|
@NotNull String string = reSupplier(this::supplyString);
|
|
|
|
onlyNonNull(string);
|
|
}
|
|
|
|
public void onlyNonNull(@NotNull String string) {
|
|
}
|
|
|
|
public @NotNull String supplyString() {
|
|
return "test";
|
|
}
|
|
|
|
public <T> T reSupplier(@NotNull Supplier<T> supplier) {
|
|
return supplier.get();
|
|
}
|
|
} |