void (@NotNull PsiMethodCallExpression call) { PsiExpression[] args = call.getArgumentList().getExpressions(); if (args.length == 0) return; PsiMethod method = call.resolveMethod(); if (method == null) return; PsiParameter[] parameters = method.getParameterList().getParameters(); if (parameters.length > args.length) return; boolean varArgCall = method.isVarArgs() && MethodCallUtils.isVarArgCall(call); if (!varArgCall && parameters.length < args.length) return; for (int i = 0; i < args.length; i++) { PsiParameter parameter = parameters[Math.min(parameters.length - 1, i)]; PsiType type = parameter.getType(); if (varArgCall && i >= parameters.length - 1 && type instanceof PsiEllipsisType) { type = ((PsiEllipsisType)type).getComponentType(); } checkNulls(type, args[i], JavaBundle.message("inspection.null.value.for.optional.context.parameter")); } }