apache / apache/netbeans

Bug: Renaming the name of a named method results in a change in the method's properties

Open
#7,841 0 comments 0 reactions 0 assignees View on GitHub
kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 23

### What happened

When the "methodToBeRenamed()" method is selected for the rename method refactoring,code before refactoring, the "methodToBeRenamed()" method in the "ParentClass" is independent of the method in the "SubClass" class; the method in the "SubClass" class becomes inherited from the "ParentClass" class.

class ParentClass{
void methodToBeRenamed(){}
}
class SubClass extends ParentClass{
void method(){}
}

### Language / Project Type / NetBeans Component

_No response_

### How to reproduce

When the "methodToBeRenamed()" method is selected for the rename method refactoring,code before refactoring, the "methodToBeRenamed()" method in the "ParentClass" is independent of the method in the "SubClass" class; the method in the "SubClass" class becomes inherited from the "ParentClass" class.

class ParentClass{
void methodToBeRenamed(){}
}
class SubClass extends ParentClass{
void method(){}
}

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Windows11

### JDK

20

### Apache NetBeans packaging

Apache NetBeans platform

### Anything else

_No response_

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Start with the Java ParentClass and SubClass example and reproduce the behavior through NetBeans' rename method refactoring. Trace the refactoring entry point and its handling of inherited methods; done means renaming the selected method without changing whether the subclass method is independent or inherited.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.