void (PsiAnnotation annotation, Nullability nullability) { PsiAnnotationOwner owner = annotation.getOwner(); if (owner == null) return; PsiModifierListOwner listOwner = owner instanceof PsiModifierList modifierList ? tryCast(modifierList.getParent(), PsiModifierListOwner.class) : null; Condition<PsiAnnotation> filter = anno -> anno != annotation && manager.getAnnotationNullability(anno.getQualifiedName()).filter(n -> n != nullability).isPresent(); PsiAnnotation oppositeAnno = ContainerUtil.find(owner.getAnnotations(), filter); if (oppositeAnno == null && listOwner != null) { oppositeAnno = manager.findExplicitNullabilityAnnotation( listOwner, ContainerUtil.filter(Nullability.values(), n -> n != nullability)); } if (oppositeAnno != null && Objects.equals(AnnotationUtil.getRelatedType(annotation), AnnotationUtil.getRelatedType(oppositeAnno))) { reportProblem(holder, annotation, new RemoveAnnotationQuickFix(annotation, listOwner), "inspection.nullable.problems.Nullable.NotNull.conflict", getPresentableAnnoName(annotation), getPresentableAnnoName(oppositeAnno)); } }