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


##########
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:
   To be honest, alhtough I do think that even greatest things (and bugs) are 
built from very small ones,  I think it's a pity the review focuses just on 
such nitpicking as this conversation. I am sure there are larger either 
structural or conceptual mistakes in my commits that would deserve a thorough 
review.
   
   In itself, this wouldn't make me to make another commit, but as there are 
other relevant  code sins pointed out, will fix.



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