[ 
https://issues.apache.org/jira/browse/NETBEANS-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Lahoda updated NETBEANS-889:
--------------------------------
    Attachment: NETBEANS-889-1.diff

>  False positive of "Null Pointer Dereference" when invoking Lamda
> -----------------------------------------------------------------
>
>                 Key: NETBEANS-889
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-889
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Hints
>    Affects Versions: 8.2, 9.0
>            Reporter: Austin Stephens
>            Priority: Major
>         Attachments: NETBEANS-889-1.diff
>
>
> 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.
> {code:java}
> // Some comments here
>       String value = "";
>       void nullDereference(){
>               Runnable run = ()->{
>                       value = null;
>               };
>               run.run();//false positive
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to