I expected this code to report an error:
public class ObjectsTest {
public static int testFunc(String a) {
return a.length();
}
public static int runT() {
Object s = null;
return testFunc(Objects.toString(s, null));
}
}
testFunc() does not receive a @Nullable and Objects.toString() with null nullDefault should not satisfy the null check.