Skip to content

Commit decfcdd

Browse files
Improve IterableType implementation.
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent d6ae1ef commit decfcdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ private class IterableType extends Class {
1212
private Type elementType;
1313

1414
IterableType() {
15-
exists(Method m, Type return, GenericType t, Type et, int position | m.getDeclaringType() = t |
15+
exists(Method m, RefType return, GenericType t, Type et, int position | m.getDeclaringType() = t |
1616
return = m.getReturnType() and
17-
return.getName().matches("Iterator%") and
17+
return.getSourceDeclaration().hasQualifiedName("java.util", "Iterator") and
1818
et = return.(ParameterizedType).getTypeArgument(0) and
1919
t.getTypeParameter(position) = et and
2020
instantiates(this, t, position, elementType)

0 commit comments

Comments
 (0)