Skip to content

Commit 4289875

Browse files
committed
make utility methods static
1 parent 94a593b commit 4289875

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

javascript/extractor/src/com/semmle/js/extractor/CFGExtractor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,22 +195,22 @@ private static Iterable<Node> createIterable(Object nodes) {
195195
/**
196196
* Creates an `Iterable<Node>` that iterates the nodes in reverse order from the one-or-more nodes contained in `nodes`.
197197
*/
198-
private Iterable<Node> createReversedIterable(final Object nodes) {
198+
private static Iterable<Node> createReversedIterable(final Object nodes) {
199199
List<Node> list = new ArrayList<>();
200200
createIterable(nodes).forEach(list::add);
201201
Collections.reverse(list);
202202
return list;
203203
}
204204

205205
/** Returns a list of all the nodes in a tree of nested lists. */
206-
private List<Node> flattenNestedList(Iterable<?> lists) {
206+
private static List<Node> flattenNestedList(Iterable<?> lists) {
207207
return flattenNestedList(lists, new ArrayList<>());
208208
}
209209

210210
/**
211211
* Appends all the nodes in a tree of nested lists the given output list, and returns that list.
212212
*/
213-
private List<Node> flattenNestedList(Iterable<?> lists, List<Node> output) {
213+
private static List<Node> flattenNestedList(Iterable<?> lists, List<Node> output) {
214214
for (Object object : lists) {
215215
if (object == null) continue;
216216
if (object instanceof Node) {
@@ -226,7 +226,7 @@ private List<Node> flattenNestedList(Iterable<?> lists, List<Node> output) {
226226

227227
/**
228228
* Creates an order preserving concatenation of the nodes in `xs` and `ys` without duplicates.
229-
* Returns `null`, or an `INode` or a `List<Node>`.
229+
* Returns `null`, or an `Node` or a `List<Node>`.
230230
*/
231231
private static Object union(Object xs, Object ys) {
232232
if (xs == null) return ys;

0 commit comments

Comments
 (0)