mbien commented on code in PR #4236:
URL: https://github.com/apache/netbeans/pull/4236#discussion_r900441709


##########
apisupport/apisupport.ant/src/org/netbeans/modules/apisupport/project/universe/ClusterUtils.java:
##########
@@ -169,8 +169,11 @@ public static Set<ClusterInfo> evaluateClusterPath(File 
root, PropertyEvaluator
                     prj = _prj;
                 } else {
                     NbModuleProvider prov2 = 
_prj.getLookup().lookup(NbModuleProvider.class);
-                    if (prov2 != null && /* XXX is there a better way? */ 
cd.equals(prov2.getModuleJarLocation().getParentFile().getParentFile())) {
-                        prj = _prj;
+                    if (prov2 != null) {
+                        File fi = prov2.getModuleJarLocation();
+                        if (fi != null && /* XXX is there a better way? */ 
cd.equals(fi.getParentFile().getParentFile())) {

Review Comment:
   if you want you can add another commit. first fixes the bug, second extracts 
the two occurrences into a utility method. This keeps bugfix and code 
improvement separate (but tbh I don't think its necessary, its small enough to 
be one commit).
   
   There is no need to wait with small cleanups like this.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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