mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-21 20:54:49 +07:00
GitOrigin-RevId: ff31ea679c0497709d0141a3ecfbf988600872e3
21 lines
511 B
Java
21 lines
511 B
Java
import org.jspecify.annotations.NullMarked;
|
|
import org.jspecify.annotations.Nullable;
|
|
|
|
import java.util.List;
|
|
|
|
@NullMarked
|
|
class Test2 {
|
|
|
|
List<? extends Bar> call(SomethingNullable<?> somethingNullable) {
|
|
Bar o = somethingNullable.get().get(0);
|
|
System.out.println(o.<warning descr="Method invocation 'toString' may produce 'NullPointerException'">toString</warning>());
|
|
return somethingNullable.get();
|
|
}
|
|
}
|
|
|
|
class Bar {
|
|
}
|
|
|
|
interface SomethingNullable<T extends Bar> {
|
|
List<@Nullable T> get();
|
|
} |