Skip to content

Commit

Permalink
Throw an exception.
Browse files Browse the repository at this point in the history
Throw an exception if we can't find a CG node corresponding to an import
statement.
  • Loading branch information
khatchad committed Jul 10, 2024
1 parent ca435ec commit a6c470a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ private void processWildcardImports(
CallGraph callGraph = this.getBuilder().getCallGraph();
Set<CGNode> nodes = callGraph.getNodes(importMethodReference);

if (nodes.isEmpty())
throw new IllegalStateException(
"Can't find CG node for import method: "
+ importMethodReference.getSignature()
+ ".");

PointerKey defPK = this.getPointerKeyForLocal(instruction.getDef());
assert defPK != null;

Expand Down

0 comments on commit a6c470a

Please sign in to comment.