PsiAnnotation (@NotNull PsiAnnotation annotation) { Project project = annotation.getProject(); NullableNotNullManager nnnm = NullableNotNullManager.getInstance(project); PsiAnnotation corrected = null; if (annotation.hasQualifiedName(AnnotationUtil.NULLABLE)) { corrected = createAnnotation(project, nnnm.getDefaultNullable()); } else if (annotation.hasQualifiedName(AnnotationUtil.NOT_NULL)) { corrected = createAnnotation(project, nnnm.getDefaultNotNull()); } return corrected != null ? corrected : annotation; }