diff --git a/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.ql b/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.ql index f43ca177689..22a78af1dea 100644 --- a/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.ql +++ b/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.ql @@ -1,13 +1,13 @@ import java RefType getARelevantCollectionType() { - result.hasQualifiedName(["java.util", "kotlin.collections"], ["Abstract", ""] + ["Mutable", ""] + ["Collection", "List", "Map"]) + result + .hasQualifiedName(["java.util", "kotlin.collections"], + ["Abstract", ""] + ["Mutable", ""] + ["Collection", "List", "Map"]) } class RelevantMethod extends Method { - RelevantMethod() { this.getDeclaringType().getSourceDeclaration() = getARelevantCollectionType() } - } // Check for methods with suspicious twins -- probably another extraction of the same method outline which was given a different trap key. @@ -18,7 +18,7 @@ query predicate methodWithDuplicate(string methodName, string typeName) { not dup.getName() = ["of", "remove", "toArray"] and // These really do have overloads with the same parameter count, so it isn't trivial to tell if they are intentional overloads or inappropriate duplicates. dup.getNumberOfParameters() = m.getNumberOfParameters() and dup.getDeclaringType() = m.getDeclaringType() and - dup != m and + dup != m and methodName = m.getName() and typeName = m.getDeclaringType().getName() )