void (@NotNull PsiMethod method) { super.visitMethod(method); final PsiParameterList parameterList = method.getParameterList(); final PsiParameter[] parameters = parameterList.getParameters(); if (parameters.length == 0) { return; } final PsiParameter parameter = parameters[parameters.length - 1]; final PsiType type = parameter.getType(); if (!(type instanceof PsiArrayType) || type instanceof PsiEllipsisType) { return; } final PsiMethod[] superMethods = method.findDeepestSuperMethods(); for (final PsiMethod superMethod : superMethods) { if (superMethod.isVarArgs()) { final PsiElement nameIdentifier = method.getNameIdentifier(); if (nameIdentifier != null) { registerErrorAtOffset(method, nameIdentifier.getStartOffsetInParent(), nameIdentifier.getTextLength()); } return; } } }