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 2022/06/02 09:56:57 UTC

[netbeans] branch master updated: Fix possible NPE at RunUtils.getCompatibleGradleDistribution

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 9d47c83086 Fix possible NPE at RunUtils.getCompatibleGradleDistribution
9d47c83086 is described below

commit 9d47c8308680e626f8962fc61189496f9ace950d
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Wed Jun 1 03:36:50 2022 -0700

    Fix possible NPE at RunUtils.getCompatibleGradleDistribution
---
 extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java
index 22144f14a1..3dda266b4a 100644
--- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java
+++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java
@@ -259,6 +259,7 @@ public final class RunUtils {
     public static GradleDistribution getCompatibleGradleDistribution(Project prj) {
         GradleDistributionProvider pvd = prj.getLookup().lookup(GradleDistributionProvider.class);
         GradleDistribution ret = pvd != null ? pvd.getGradleDistribution() : GradleDistributionManager.get().defaultDistribution();
+        ret = ret != null ? ret : GradleDistributionManager.get().defaultDistribution();
         ret = ret.isCompatibleWithSystemJava() ? ret : GradleDistributionManager.get().defaultDistribution();
         return ret;
 


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