lbownik commented on code in PR #5660:
URL: https://github.com/apache/netbeans/pull/5660#discussion_r1137365730


##########
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/VulnerabilityWorker.java:
##########
@@ -569,14 +575,19 @@ private int convert(Dependency dependency, Map<String, 
Integer> gavIndex, List<A
         List<String> childrenNodeIds = new 
ArrayList<>(dependency.getChildren().size());
         for (Dependency childDependency : dependency.getChildren()) {
             int cid = convert(childDependency, gavIndex, result);
-            childrenNodeIds.add(Integer.toString(cid));
+            if (cid != -1) {
+                childrenNodeIds.add(Integer.toString(cid));
+            }
         }
         builder.applicationDependencyNodeIds(childrenNodeIds);
         result.add(builder.build());
         return n;
     }
 
     private static String createGAV(ArtifactSpec artifact) {
+        if (artifact == null) {
+            return null;
+        }
         StringBuffer sb = new StringBuffer();

Review Comment:
   "weight in the benefit of a refactoring vs. the possibility of bugs slipping 
in."
   That's why unit test got invented ... oh wait ... unit test PRs get ignored 
as well.



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