In the attachement (which is a very contrived example, though inspired from a real world use-case), FindBugs complains about the line:
iff the line above:
is not commented out.
This would be completely correct, when 'metrics' could toggle between non null and null.
However, I think that FindBugs would do a much better job at avoiding false positives if it could acknowledge that some private fields never go back to being null.
Log in to post a comment.