You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2023/01/23 02:39:08 UTC

[GitHub] [netbeans] mbien opened a new pull request, #5346: PreconditionsChecker: fixed NPE when path is null.

mbien opened a new pull request, #5346:
URL: https://github.com/apache/netbeans/pull/5346

   fixes #5202, targets delivery
   
   ```
   java.lang.NullPointerException: Cannot invoke "com.sun.source.util.TreePath.getLeaf()" because "path" is null
   	at org.netbeans.lib.nbjavac.services.NBJavacTrees.getElement(NBJavacTrees.java:66)
   	at org.netbeans.lib.nbjavac.services.NBJavacTrees.getElement(NBJavacTrees.java:40)
   	at org.netbeans.modules.java.hints.jdk.mapreduce.PreconditionsChecker$VariablesVisitor.isLocalVariable(PreconditionsChecker.java:226)
   ```
   `JavacTrees` and `NBJavacTrees` don't accept null as path parameters in the `getElement` method, so we guard against it and return `false`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [netbeans] neilcsmith-net merged pull request #5346: PreconditionsChecker: fixed NPE when path is null.

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net merged PR #5346:
URL: https://github.com/apache/netbeans/pull/5346


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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