don't search for Override in external annotations

EA-103324 - PIEAE: PsiUtilCore.ensureValid
This commit is contained in:
Anna Kozlova
2017-06-16 13:33:23 +03:00
parent 1e2924fb3e
commit 136f4fa894
@@ -125,7 +125,7 @@ public class RenameJavaMethodProcessor extends RenameJavaMemberProcessor {
qualifyStaticImportReferences(staticImportHides);
if (!method.isConstructor() && method.findDeepestSuperMethods().length == 0) {
PsiAnnotation annotation = AnnotationUtil.findAnnotation(method, CommonClassNames.JAVA_LANG_OVERRIDE);
PsiAnnotation annotation = AnnotationUtil.findAnnotation(method, true, CommonClassNames.JAVA_LANG_OVERRIDE);
if (annotation != null && annotation.isPhysical()) {
annotation.delete();
}