mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more robust check for an array type
IDEA-CR-33683
This commit is contained in:
+1
-7
@@ -104,13 +104,7 @@ public class SuspiciousToArrayCallInspection extends BaseInspection {
|
||||
else {
|
||||
argumentType = argument.getType();
|
||||
}
|
||||
if (argumentType instanceof PsiClassType) {
|
||||
argumentType = PsiUtil.convertAnonymousToBaseType(argumentType);
|
||||
if (((PsiClassType)argumentType).getParameterCount() == 1) {
|
||||
return ((PsiClassType)argumentType).getParameters()[0];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return PsiUtil.substituteTypeParameter(argumentType, "java.util.function.IntFunction", 0, false);
|
||||
}
|
||||
|
||||
private void checkArrayTypes(@NotNull PsiExpression argument,
|
||||
|
||||
Reference in New Issue
Block a user