mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 21:52:48 +07:00
Now, new one could be used which is more correct Fixes IDEA-375493 Nullability of generic type with several bounds depends on bounds order GitOrigin-RevId: 24e8aab73704d9b2b5ea7e47215bfeeadaed2f26
13 lines
530 B
Java
13 lines
530 B
Java
import org.jspecify.annotations.NullMarked;
|
|
import org.jspecify.annotations.Nullable;
|
|
|
|
@NullMarked
|
|
class Test2 {
|
|
<T extends @Nullable Object & CharSequence> T test(@Nullable T t) {
|
|
return <warning descr="Expression 't' might evaluate to null but is returned by the method declared as @NullMarked">t</warning>;
|
|
}
|
|
|
|
<T extends Object & @Nullable CharSequence> T test2(@Nullable T t) {
|
|
return <warning descr="Expression 't' might evaluate to null but is returned by the method declared as @NullMarked">t</warning>;
|
|
}
|
|
} |