See test case at https://gist.github.com/1747506 Briefly, annotating a field with CheckForNull gives a false positive when used in an anonymous inner class, even if the reference is inside a null check.
OK, problem is that the access to the private field is getting turned into a call to an accessor method.
Maybe I should just inline access methods.
But shouldn't the accessor call still be inside the null check?
Yes, but analysis doesn't correlate method calls. It does correlate loads from fields.
Log in to post a comment.
OK, problem is that the access to the private field is getting turned into
a call to an accessor method.
Maybe I should just inline access methods.
But shouldn't the accessor call still be inside the null check?
Yes, but analysis doesn't correlate method calls. It does correlate loads from fields.