Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
d-kozak committed Apr 24, 2024
1 parent ebbb478 commit d441cd9
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ private static void printCsvFiles(Map<AnalysisMethod, MethodNode> methodToNode,

List<MethodNode> entrypoints = methodToNode.values().stream().filter(n -> n.isEntryPoint).toList();
for (MethodNode entrypoint : entrypoints) {
walkNodes((MethodNode) entrypoint, nodes, methodToNode);
walkNodes(entrypoint, nodes, methodToNode);
}

String msgPrefix = "call tree csv file for ";
Expand Down Expand Up @@ -433,10 +433,8 @@ private static List<String> invokeNodeInfo(Map<AnalysisMethod, MethodNode> metho
}

private static List<String> callTargetInfo(InvokeNode invoke, Node callee) {
if (callee instanceof MethodNodeReference) {
callee = ((MethodNodeReference) callee).methodNode;
}
return Arrays.asList(String.valueOf(invoke.id), String.valueOf(((MethodNode) callee).id));
MethodNode node = callee instanceof MethodNodeReference ref ? ref.methodNode : ((MethodNode) callee);
return Arrays.asList(String.valueOf(invoke.id), String.valueOf(node.id));
}

private static void walkNodes(MethodNode methodNode, Set<MethodNode> nodes, Map<AnalysisMethod, MethodNode> methodToNode) {
Expand Down

0 comments on commit d441cd9

Please sign in to comment.