Austin Stephens created NETBEANS-889:
----------------------------------------

             Summary:  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


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-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to