mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
Java: keep @Override annotation when renaming record accessor method (IDEA-365420)
GitOrigin-RevId: b7bdf5fd1aadcb4aaa396f866ff73bd5e5de0e3e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
338200935b
commit
620c92a50a
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.refactoring.rename;
|
||||
|
||||
import com.intellij.codeInsight.AnnotationUtil;
|
||||
@@ -114,7 +114,8 @@ public class RenameJavaMethodProcessor extends RenameJavaMemberProcessor {
|
||||
qualifyOuterMemberReferences(outerHides);
|
||||
qualifyStaticImportReferences(staticImportHides);
|
||||
|
||||
if (!method.isConstructor() && !(method instanceof LightElement) && method.findDeepestSuperMethods().length == 0) {
|
||||
if (!method.isConstructor() && !(method instanceof LightElement) && JavaPsiRecordUtil.getRecordComponentForAccessor(method) == null
|
||||
&& method.findDeepestSuperMethods().length == 0) {
|
||||
PsiAnnotation annotation = AnnotationUtil.findAnnotation(method, true, CommonClassNames.JAVA_LANG_OVERRIDE);
|
||||
if (annotation != null) {
|
||||
annotation.delete();
|
||||
|
||||
Reference in New Issue
Block a user