blob: a1d263f778f66219bf25c08bdd867ccbf0cb5bdd [file] [log] [blame]
import org.jetbrains.annotations.Nullable;
class Doo {
boolean isMaybeNotNull(@Nullable Object o) {
return o != null;
}
void foo(@Nullable String s) {
if (isMaybeNotNull(s)) {
System.out.println(<warning descr="Method invocation 's.length()' may produce 'java.lang.NullPointerException'">s.length()</warning>);
}
}
}
class DooImpl extends Doo {
boolean isMaybeNotNull(@Nullable Object o) {
return hashCode() == 42;
}
}