apache / apache/netbeans

Bug: A syntax error occurred in renaming a method in the interface

Open
#7,576 1 comment 0 reactions 0 assignees View on GitHub
Java 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 22

### What happened

A syntax error occurred in renaming a method in the interface.

### Language / Project Type / NetBeans Component

_No response_

### How to reproduce

selecting 'methodToRename' in interface I
Renaming 'methodToRename' to 'equals'

Because the new method name 'equals' is the method in the existing API, it causes a compilation error when applied to refactor the new name
![image](https://github.com/user-attachments/assets/85153f64-f516-44b5-84ad-3796a34c12b8)

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

No / Don't know

### Operating System

Windows11

### JDK

20

### Apache NetBeans packaging

Other

### Anything else

_No response_

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

No

Contributor guide

Open the contributing guide

Research direction

Reproduce this in Apache NetBeans 22 on Windows 11 with JDK 20: select methodToRename in interface I and rename it to equals. No source file or test is named, so begin by locating the Java refactoring path that handles interface method renames and inspect the resulting compilation error. Done means the rename no longer produces a syntax or compilation error.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.