void (@NotNull PsiMethod method) { if (method.isConstructor() || !method.hasModifierProperty(PsiModifier.ABSTRACT)) { return; } boolean overrideDefault = false; boolean accept = false; final PsiMethod[] superMethods = method.findSuperMethods(); for (final PsiMethod superMethod : superMethods) { overrideDefault |= superMethod.hasModifierProperty(PsiModifier.DEFAULT); if (!superMethod.hasModifierProperty(PsiModifier.ABSTRACT)) { continue; } if (overrideDefault) { return; } accept |= methodsHaveSameReturnTypes(method, superMethod) && haveSameExceptionSignatures(method, superMethod) && method.isVarArgs() == superMethod.isVarArgs(); if (ignoreJavaDoc && !haveSameJavaDoc(method, superMethod)) { return; } if (!methodsHaveSameAnnotationsAndModifiers(method, superMethod)) { return; } } if (accept && !overrideDefault) { registerMethodError(method); } }