Add Navigable variants and sort method names

This commit is contained in:
Arthur Baars
2020-07-02 13:02:38 +02:00
parent e7b495e7d3
commit d80bf3395f

View File

@@ -167,12 +167,15 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
method.getDeclaringType().hasQualifiedName("java.util", "Collections") and
(
method
.hasName(["singleton", "singletonList", "singletonMap", "enumeration", "list", "max", "min",
"asLifoQueue", "checkedCollection", "checkedList", "checkedMap", "checkedSet",
"checkedSortedMap", "checkedSortedSet", "synchronizedCollection", "synchronizedList",
"synchronizedMap", "synchronizedSet", "synchronizedSortedMap",
"synchronizedSortedSet", "unmodifiableCollection", "unmodifiableList",
"unmodifiableMap", "unmodifiableSet", "unmodifiableSortedMap", "unmodifiableSortedSet"]) and
.hasName(["checkedCollection", "checkedList", "checkedMap", "checkedNavigableMap",
"checkedNavigableSet", "checkedSet", "checkedSortedMap", "checkedSortedSet",
"enumeration", "list", "max", "min", "singleton", "singletonList", "singletonMap",
"synchronizedCollection", "synchronizedList", "synchronizedMap",
"synchronizedNavigableMap", "synchronizedNavigableSet", "synchronizedSet",
"synchronizedSortedMap", "synchronizedSortedSet", "unmodifiableCollection",
"unmodifiableList", "unmodifiableMap", "unmodifiableNavigableMap",
"unmodifiableNavigableSet", "unmodifiableSet", "unmodifiableSortedMap",
"unmodifiableSortedSet"]) and
arg = 0
or
method.hasName(["nCopies", "singletonMap"]) and arg = 1