#1041 False positive NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

open-postponed
5
2012-05-10
2012-02-05
Ryan W Sims
No

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.

Discussion

  • William Pugh

    William Pugh - 2012-02-09

    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.

     
  • William Pugh

    William Pugh - 2012-02-09
    • status: open --> open-accepted
     
  • Ryan W Sims

    Ryan W Sims - 2012-02-09

    But shouldn't the accessor call still be inside the null check?

     
  • William Pugh

    William Pugh - 2012-04-16

    Yes, but analysis doesn't correlate method calls. It does correlate loads from fields.

     
  • William Pugh

    William Pugh - 2012-05-10
    • status: open-accepted --> open-postponed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks