Files
openide/java/java-tests/testData/inspection/dataFlow/NullableThroughCast/src/Npe.java
T
2009-09-25 20:42:06 +04:00

16 lines
316 B
Java

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class Npe {
Object foo(@NotNull Object o) {
return o;
}
@Nullable Object nullable() {
return null;
}
void bar() {
Object o = foo((Object)nullable()); // null should not be passed here.
}
}