You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2019/04/29 18:24:34 UTC

[netbeans] branch master updated: [NETBEANS-2466] Guard JavaSource.create() result against possible NPE.

This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 0988bf3  [NETBEANS-2466] Guard JavaSource.create() result against possible NPE.
0988bf3 is described below

commit 0988bf3599dc42aa00941d0e51c4783fa82ec75a
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Thu Apr 25 14:09:35 2019 -0700

    [NETBEANS-2466] Guard JavaSource.create() result against possible NPE.
---
 .../modules/java/api/common/project/ActionProviderSupport.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ActionProviderSupport.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ActionProviderSupport.java
index 64be411..0e334de 100644
--- a/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ActionProviderSupport.java
+++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/project/ActionProviderSupport.java
@@ -912,9 +912,11 @@ final class ActionProviderSupport {
             ClassPathSupport.createClassPath(new URL[0]),
             ClassPathSupport.createClassPath(new URL[0]));
         final JavaSource js = JavaSource.create(info);
-        js.runWhenScanFinished((final CompilationController controller) -> {
-            runnable.run();
-        }, true);
+        if (js != null) {
+            js.runWhenScanFinished((final CompilationController controller) -> {
+                runnable.run();
+            }, true);
+        }
     }
 
     @CheckForNull


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