When I run FindBug on this code, it reports NO issues.
boolean _closed = false;
public void m1(@Nullable String text) {
if(_closed)
return;
System.out.println(text.toLowerCase());
}
While here it finds issue as expected:
public void m1(@Nullable String text) {
System.out.println(text.toLowerCase()); // FindBugs: text must be nonnull but is marked as nullable
}
Why does it fail in first case?