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 271823

Summary: False positive of "Non-null method returns null"
Product: java Reporter: SirIntellegence
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED FIXED    
Severity: normal CC: dtrebbien
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample code

Description SirIntellegence 2017-11-16 21:08:59 UTC
Created attachment 165462 [details]
Sample code

You have a lambda passed into another (@NonNull) method that is providing a return value for the current @NonNull method. If the lambda returns null, you get a warning that you are returning null in a @NonNull method. See sample code for details.
Comment 1 dtrebbien 2017-11-23 01:41:06 UTC
I have created a Pull Request to fix this issue here: https://github.com/apache/incubator-netbeans/pull/287
Comment 2 dtrebbien 2017-11-23 01:42:18 UTC
By the way, thank you for providing a minimal test case!
Comment 3 SirIntellegence 2017-12-08 19:19:33 UTC
You are welcome. I have determined that bugs get fixed faster if I do provide one.
Comment 4 dtrebbien 2017-12-12 18:40:12 UTC
PR 287 has been merged. Closing as fixed.