mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
fix a case in union where order wasn't necessarily preserved
This commit is contained in:
@@ -225,7 +225,14 @@ public class CFGExtractor {
|
||||
return Collections.singleton(x);
|
||||
}
|
||||
if (ys.contains(x)) {
|
||||
return ys;
|
||||
List<Node> result = new ArrayList<>();
|
||||
result.add(x);
|
||||
for (Node y : ys) {
|
||||
if (y != x) {
|
||||
result.add(y);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
List<Node> result = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user