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

sdedic 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 5b685fff38 Fixing potential NPE.
     new df253ecdbe Merge pull request #3969 from 
sdedic/greadle/infobuilder-npe-fix
5b685fff38 is described below

commit 5b685fff389c5c84c32bce63f854467deeb2c6a2
Author: Svata Dedic <[email protected]>
AuthorDate: Tue Apr 12 12:00:05 2022 +0200

    Fixing potential NPE.
---
 .../java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
 
b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
index d281e9f7e6..802608855a 100644
--- 
a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
+++ 
b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
@@ -445,7 +445,8 @@ class NbProjectInfoBuilder {
                                 // do not bother with components that only 
select a variant, which is itself a component
                                 // TODO: represent as a special component type 
so the IDE shows it, but the IDE knows it is an abstract
                                 // intermediate with no artifact(s).
-                                if 
(!rdr.getResolvedVariant().getExternalVariant().isPresent()) {
+                                if (rdr.getResolvedVariant() == null ||
+                                    
!rdr.getResolvedVariant().getExternalVariant().isPresent()) {
                                     
componentIds.add(rdr.getSelected().getId().toString());
                                 }
                             }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to