Bug: Renaming to an interface name results in a syntax error
- 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, it causes a refactoring bug because the new method name being renamed conflicts with the method of existing APIs , resulting in a syntax error.
interface I{
String methodToBeRenamed();
}
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
When the "methodToBeRenamed" method is selected for the rename method refactoring, it causes a refactoring bug because the new method name being renamed conflicts with the method of existing APIs , resulting in a syntax error.
interface I{
String methodToBeRenamed();
}
### Did this work correctly in an earlier version?
Apache NetBeans 23
### Operating System
Windows11
### JDK
20
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start with the Java rename method refactoring using the interface example in the issue and reproduce the syntax error when the new name conflicts with an existing API method. Trace the generated result and add regression coverage once the conflicting name and expected valid output are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100