You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/07/16 14:06:29 UTC

[GitHub] vikasprabhakar commented on a change in pull request #635: [NetBeans-1019]False positive of "Null Pointer Dereference" when passing a lambda with a null possible result to a non-null argument

vikasprabhakar commented on a change in pull request #635: [NetBeans-1019]False positive of "Null Pointer Dereference" when passing a lambda with a null possible result to a non-null argument
URL: https://github.com/apache/incubator-netbeans/pull/635#discussion_r202694924
 
 

 ##########
 File path: java.hints/src/org/netbeans/modules/java/hints/bugs/NPECheck.java
 ##########
 @@ -625,7 +626,7 @@ public State scan(Tree tree, Void p) {
             
             TypeMirror currentType = tree != null ? info.getTrees().getTypeMirror(new TreePath(getCurrentPath(), tree)) : null;
             
-            if (currentType != null && currentType.getKind().isPrimitive()) {
+            if ((tree != null && tree instanceof JCTree.JCLambda) || (currentType != null && currentType.getKind().isPrimitive())) {
 
 Review comment:
   getKind() method added.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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