Skip to content

Commit d80bf33

Browse files
committed
Add Navigable variants and sort method names
1 parent e7b495e commit d80bf33

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,15 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
167167
method.getDeclaringType().hasQualifiedName("java.util", "Collections") and
168168
(
169169
method
170-
.hasName(["singleton", "singletonList", "singletonMap", "enumeration", "list", "max", "min",
171-
"asLifoQueue", "checkedCollection", "checkedList", "checkedMap", "checkedSet",
172-
"checkedSortedMap", "checkedSortedSet", "synchronizedCollection", "synchronizedList",
173-
"synchronizedMap", "synchronizedSet", "synchronizedSortedMap",
174-
"synchronizedSortedSet", "unmodifiableCollection", "unmodifiableList",
175-
"unmodifiableMap", "unmodifiableSet", "unmodifiableSortedMap", "unmodifiableSortedSet"]) and
170+
.hasName(["checkedCollection", "checkedList", "checkedMap", "checkedNavigableMap",
171+
"checkedNavigableSet", "checkedSet", "checkedSortedMap", "checkedSortedSet",
172+
"enumeration", "list", "max", "min", "singleton", "singletonList", "singletonMap",
173+
"synchronizedCollection", "synchronizedList", "synchronizedMap",
174+
"synchronizedNavigableMap", "synchronizedNavigableSet", "synchronizedSet",
175+
"synchronizedSortedMap", "synchronizedSortedSet", "unmodifiableCollection",
176+
"unmodifiableList", "unmodifiableMap", "unmodifiableNavigableMap",
177+
"unmodifiableNavigableSet", "unmodifiableSet", "unmodifiableSortedMap",
178+
"unmodifiableSortedSet"]) and
176179
arg = 0
177180
or
178181
method.hasName(["nCopies", "singletonMap"]) and arg = 1

0 commit comments

Comments
 (0)