mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-inspections] MismatchedCollectionQueryUpdateInspection: assume a collection as non-empty if its constructor accepts iterator
GitOrigin-RevId: 2d381e8ae775efa7cbe621aa185766fa74abcc6f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d3032a36a0
commit
461d220ace
@@ -506,6 +506,9 @@ public final class MismatchedCollectionQueryUpdateInspection extends BaseInspect
|
||||
if (CollectionUtils.isCollectionClassOrInterface(type)) {
|
||||
return false;
|
||||
}
|
||||
if (InheritanceUtil.isInheritor(type, CommonClassNames.JAVA_UTIL_ITERATOR)) {
|
||||
return false;
|
||||
}
|
||||
if (type instanceof PsiArrayType && !(type instanceof PsiEllipsisType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user