The following is (annoyingly) valid Java code for calling a static method:
class Foo {
public static String foo(@Nullable Object ignored) { return "Nonsense java black magic!"; };
}
class Bar extends Foo { }
class Main {
public static void main(String[] args) {
System.out.println(Bar.foo(null));
}
}
However, NullAway will fail to read the annotations of Foo.foo(...) when inspecting the static call to Bar.foo(...) and thus give an error on Bar.foo(null).
The following is (annoyingly) valid Java code for calling a static method:
However, NullAway will fail to read the annotations of
Foo.foo(...)when inspecting the static call toBar.foo(...)and thus give an error onBar.foo(null).