Quickfix: avoid exception of missing node in graph
@@ -141,15 +141,19 @@ public class VulnerabilityCacheProcessorPlugin extends Plugin {
return path;
}
visited.add(source);
+
+ if (!graph.containsVertex(source)) {
+ logger.info("Graph doesn't contain vertex: " + source);
+ return null;
+ }
+
for (var node : graph.successors(source)) {
if (!visited.contains(node)) {
-// path.add(node);
getPathsToVulnerableNode(graph, node, target, visited, path);
-// path.remove(node);
}
}
visited.remove(source);
- return path;
+ return null;
}
/**
