Skip to content

Commit cfd8f90

Browse files
committed
Wrap Java's instantiation in a module since it's in the top-level scope
Unlike other languages, Java exported 'ViewCfgQuery' in top-level of the default import (java.qll). But after the rename to ViewGraphQuery the name is too ambiguous. We can't make an alias for a parameterised module, so instead wrapping it in a module named 'PrintCfg'.
1 parent 654fa9e commit cfd8f90

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

java/ql/lib/printCfg.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
import java
11+
import PrintCfg
1112

1213
external string selectedSourceFile();
1314

java/ql/lib/semmle/code/java/ControlFlowGraph.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1788,4 +1788,7 @@ private module PrintGraphInput implements PrintGraph::InputSig<Location> {
17881788
ControlFlowNode getASuccessor(ControlFlowNode n, SuccessorType t) { result = n.getASuccessor(t) }
17891789
}
17901790

1791-
import PrintGraph::PrintGraph<Location, PrintGraphInput>
1791+
/** Provides utilities for visualising the CFG. */
1792+
module PrintCfg {
1793+
import PrintGraph::PrintGraph<Location, PrintGraphInput>
1794+
}

0 commit comments

Comments
 (0)