diff --git a/java/java-psi-api/src/com/intellij/codeInsight/AnnotationUtil.java b/java/java-psi-api/src/com/intellij/codeInsight/AnnotationUtil.java index a00448a66392..7065e10fd2ea 100644 --- a/java/java-psi-api/src/com/intellij/codeInsight/AnnotationUtil.java +++ b/java/java-psi-api/src/com/intellij/codeInsight/AnnotationUtil.java @@ -125,12 +125,12 @@ public class AnnotationUtil { private static final ParameterizedCachedValueProvider, List>, PsiModifierListOwner> NON_CODE_ANNOTATIONS_PROVIDER = (PsiModifierListOwner listOwner) -> { Map, List> value = ConcurrentFactoryMap.createMap( - annotationNames1 -> { + annotationNames -> { PsiUtilCore.ensureValid(listOwner); final Project project = listOwner.getProject(); List annotations = null; final ExternalAnnotationsManager externalAnnotationsManager = ExternalAnnotationsManager.getInstance(project); - for (String annotationName : annotationNames1) { + for (String annotationName : annotationNames) { List externalAnnotations = externalAnnotationsManager.findExternalAnnotations(listOwner, annotationName); if (!externalAnnotations.isEmpty()) { if (annotations == null) { @@ -141,7 +141,7 @@ public class AnnotationUtil { } final InferredAnnotationsManager inferredAnnotationsManager = InferredAnnotationsManager.getInstance(project); - for (String annotationName : annotationNames1) { + for (String annotationName : annotationNames) { final PsiAnnotation annotation = inferredAnnotationsManager.findInferredAnnotation(listOwner, annotationName); if (annotation != null) { if (annotations == null) {