void (PsiCall call) { final PsiExpressionList argumentList = call.getArgumentList(); if (argumentList == null) { return; } final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length == 0) { return; } final PsiExpression lastArgument = arguments[arguments.length - 1]; final PsiType type = lastArgument.getType(); final JavaResolveResult resolveResult = call.resolveMethodGenerics(); PsiArrayType arrayType = getSuspiciousVarargType(call, type, () -> (PsiMethod)resolveResult.getElement()); if (arrayType == null) { return; } final PsiSubstitutor substitutor = resolveResult.getSubstitutor(); final PsiType componentType = substitutor.substitute(arrayType.getComponentType()); final PsiType substitutedArrayType = substitutor.substitute(arrayType); registerError(lastArgument, lastArgument, componentType, substitutedArrayType); }