mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[java-psi] IDEA-379919 Guava. Possible NPE is not highlighted. Common type can be nullable?
GitOrigin-RevId: 1a7b4c1521d85e1424bf371fcaea97f062a6b50d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d337da646a
commit
7e4ed9a6c2
@@ -16,7 +16,19 @@ class MyTest {
|
||||
Iterable<T> iterable, int position);
|
||||
}
|
||||
|
||||
void foo1(List<@Nullable Integer> l1, List<@Nullable String> l2) {
|
||||
for (Object s : Iterables.concat(l1, l2)) {
|
||||
System.out.println(s.<warning descr="Method invocation 'toString' may produce 'NullPointerException'">toString</warning>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void foo2(List<@Nullable Integer> l1, List<String> l2) {
|
||||
for (Object s : Iterables.concat(l1, l2)) {
|
||||
System.out.println(s.<warning descr="Method invocation 'toString' may produce 'NullPointerException'">toString</warning>());
|
||||
}
|
||||
}
|
||||
|
||||
void toArray(List<@Nullable String> l1) {
|
||||
for (String s : Iterables.toArray(l1, String.class)) {
|
||||
System.out.println(s.<warning descr="Method invocation 'length' may produce 'NullPointerException'">length</warning>());
|
||||
|
||||
Reference in New Issue
Block a user