void (final @NotNull PsiNameValuePair pair) { PsiAnnotationMemberValue value = pair.getValue(); PsiReference reference = pair.getReference(); if (reference == null) return; PsiElement element = reference.resolve(); if (!(element instanceof PsiAnnotationMethod)) return; PsiAnnotationMemberValue defaultValue = ((PsiAnnotationMethod)element).getDefaultValue(); if (defaultValue == null) return; if (AnnotationUtil.equal(value, defaultValue)) { PsiElement elementParent = element.getParent(); if (elementParent instanceof PsiClass) { final String qualifiedName = ((PsiClass)elementParent).getQualifiedName(); final String name = ((PsiAnnotationMethod)element).getName(); if (ContainerUtil.exists(IgnoreAnnotationParamSupport.EP_NAME.getExtensionList(), ext -> ext.ignoreAnnotationParam(qualifiedName, name))) { return; } } holder.registerProblem(value, JavaBundle.message("inspection.message.redundant.default.parameter.value.assignment"), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createRemoveParameterFix()); } }