Files
openide/java/java-tests/testData/inspection/dataFlow/fixture/NullableOnSuperParameter.java
Peter Gromov 3a7ab57eb2 IDEA-228079 Bad code green when dereferencing an unannotated parameter with nullable super
GitOrigin-RevId: ff3b4f3c7c01c2fb5aa90107037517653cadafa2
2020-01-08 18:34:42 +00:00

12 lines
304 B
Java

import org.jetbrains.annotations.Nullable;
interface Foo {
void test(@Nullable String s);
}
class Bar implements Foo {
@Override
public void test(String s) {
System.out.println(s.<warning descr="Method invocation 'trim' may produce 'NullPointerException'">trim</warning>());
}
}