Skip to content

Commit

Permalink
Fix bug in missing call edge
Browse files Browse the repository at this point in the history
Signed-off-by: Rahul Krishna <[email protected]>
  • Loading branch information
rahlk committed May 23, 2024
1 parent 677ce82 commit 76488fb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main/java/com/ibm/northstar/SystemDependencyGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,11 @@ private static org.jgrapht.Graph<Pair<String, Callable>, AbstractGraphEdge> buil

// Get the edge between the source and the target
AbstractGraphEdge cgEdge = graph.getEdge(source, target);

if (cgEdge == null) {
if (cgEdge instanceof CallEdge) {
((CallEdge) cgEdge).incrementWeight();
} else {
graph.addEdge(source, target, new CallEdge());
}
// If edge exists, then increment the weight
else {
cgEdge.incrementWeight();
}
}
});
});
Expand Down

0 comments on commit 76488fb

Please sign in to comment.