From fd27cff6070868e7dc280e849dde24e3ce9d2fdf Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Fri, 21 Sep 2018 18:38:02 +0700 Subject: [PATCH] MagicConstantInspection: cache on realElement --- .../codeInspection/magicConstant/MagicConstantInspection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/codeInspection/magicConstant/MagicConstantInspection.java b/java/java-impl/src/com/intellij/codeInspection/magicConstant/MagicConstantInspection.java index 3e9fbb66b599..fbad6d7d2fe1 100644 --- a/java/java-impl/src/com/intellij/codeInspection/magicConstant/MagicConstantInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/magicConstant/MagicConstantInspection.java @@ -454,7 +454,7 @@ public class MagicConstantInspection extends AbstractBaseJavaLocalInspectionTool } else { realElement = element; } - return CachedValuesManager.getCachedValue(element, () -> + return CachedValuesManager.getCachedValue(realElement, () -> CachedValueProvider.Result.create(AnnotationUtil.getAllAnnotations(realElement, true, null, false), PsiModificationTracker.MODIFICATION_COUNT)); }