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 - False positive of "Null Pointer Dereference" when invoking Lamda
Summary: False positive of "Null Pointer Dereference" when invoking Lamda
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2017-12-15 22:47 UTC by SirIntellegence
Modified: 2017-12-18 17:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Sample code (127 bytes, text/plain)
2017-12-15 22:47 UTC, SirIntellegence

Note You need to log in before you can comment on or make changes to this bug.
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.