mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
GitOrigin-RevId: dbd7c1fd3b59880032f44c9d6ca5838d2763eae0
39 lines
1.1 KiB
Java
39 lines
1.1 KiB
Java
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.NotNullByDefault;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
import java.util.List;
|
|
|
|
@NotNullByDefault
|
|
class Container<T extends CharSequence> {
|
|
<warning descr="Redundant nullability annotation: type parameter upper bound is already non-null">@NotNull</warning> T getT() {
|
|
return null;
|
|
}
|
|
|
|
<L extends @Nullable Object> List<@NotNull L> get() {
|
|
return null;
|
|
}
|
|
|
|
void call() {
|
|
for (Object t : get()) {
|
|
System.out.println(t.toString());
|
|
}
|
|
}
|
|
|
|
<L extends String> List<<warning descr="Redundant nullability annotation: type parameter upper bound is already non-null">@NotNull</warning> L> get2() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
class NoContainer {
|
|
<L extends @Nullable Object> List<@NotNull L> get() {
|
|
return null;
|
|
}
|
|
<L extends String> List<@NotNull L> get2() {
|
|
return null;
|
|
}
|
|
<L extends @NotNull String> List<<warning descr="Redundant nullability annotation: type parameter upper bound is already non-null">@NotNull</warning> L> get3() {
|
|
return null;
|
|
}
|
|
|
|
} |