This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271926

Summary: False positive of "Null Pointer Dereference" when invoking Lamda
Product: java Reporter: SirIntellegence
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample code

Description SirIntellegence 2017-12-15 22:47:59 UTC
Created attachment 165574 [details]
Sample code

If the last line of a void Lamda is "field = null" and invoke the resulting (in this case) Runnable, Netbeans will tell you that you are dereferncing a null pointer. See code.