Created attachment 162104 [details]
incorrect code hint shown
See the attached screenshot. In this case, the variable `nextRunTime` can clearly be NULL if the method `getNextRunTime` returns NULL.
The issue seems to be the closure/lamda I'm supplying as a parameter to the method. If I replace it with an anonymous inner class hints behave correctly.
Can you please evaluate this problem ASAP? Thanks!
Does this happen in development build only or also in 8.2 Release Candidate?
Confirmed; generally these types of defect are classified P3.
The NPE analysis code is quite complex; unless the fix is something very trivial (will investigate) I would not recommend fixing this issue in high resistance.
Update: the defect is in a shared utility, so it potentially affects also if-to-switch conversion, Introduce Method and possibly may produce false warnings on expressions/values unused afer assignment.
Fixed in trunk by jet-main#15ecebefc019
Integrated into 'main-silver', will be available in build *201609200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Svata Dedic <email@example.com>
Log: #268089: do not descend into lambda expr