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


##########
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:
   That's bad. 
   Speaking for myself, I can't promise I am 'not one of them', but at least I 
can TRY not be one of them - no guarantee on the outcome. Try me ;)
   
   Other thought: consider (just) the size of the codebase and average age of 
the code (= techniques which were valid 15 yrs ago, but are obsolete now). Then 
weight in the benefit of a refactoring vs. the possibility of bugs slipping in. 
This comparison may easily result in a rejection for reasons that may seem 
silly and/or evasive to new contributors. Just a thought. Anyway, any such 
feelings should be voiced on the mailing list.



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