You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Jan Lahoda (JIRA)" <ji...@apache.org> on 2018/06/08 03:44:00 UTC
[jira] [Updated] (NETBEANS-889) False positive of "Null Pointer
Dereference" when invoking Lamda
[ 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: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists