You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by GitBox <gi...@apache.org> on 2017/11/30 19:47:35 UTC

[GitHub] matthiasblaesing closed pull request #262: Fix NullPointerException at com.sun.source.util.TreePath.

matthiasblaesing closed pull request #262: Fix NullPointerException at com.sun.source.util.TreePath.<init>
URL: https://github.com/apache/incubator-netbeans/pull/262
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBJavadocMemberEnter.java b/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBJavadocMemberEnter.java
index 8f227596b..df8734d2d 100644
--- a/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBJavadocMemberEnter.java
+++ b/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBJavadocMemberEnter.java
@@ -68,7 +68,10 @@ public void visitMethodDef(JCMethodDecl tree) {
         cancelService.abortIfCanceled();
         super.visitMethodDef(tree);
         if (trees instanceof NBJavacTrees && !env.enclClass.defs.contains(tree)) {
-            ((NBJavacTrees)trees).addPathForElement(tree.sym, new TreePath(trees.getPath(env.toplevel, env.enclClass), tree));
+            TreePath path = trees.getPath(env.toplevel, env.enclClass);
+            if (path != null) {
+                ((NBJavacTrees)trees).addPathForElement(tree.sym, new TreePath(path, tree));
+            }
         }
     }
 


 

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