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.
Summary: | False positive of "Non-null method returns null" | ||
---|---|---|---|
Product: | java | Reporter: | SirIntellegence |
Component: | Hints | Assignee: | 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 |
I have created a Pull Request to fix this issue here: https://github.com/apache/incubator-netbeans/pull/287 By the way, thank you for providing a minimal test case! You are welcome. I have determined that bugs get fixed faster if I do provide one. PR 287 has been merged. Closing as fixed. |
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.