redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.08k stars 433 forks source link

Renaming method causes behavior change #3620

Open DongChunHao opened 5 months ago

DongChunHao commented 5 months ago

[provide a description of the issue]

Environment

Operating System: Windows11 JDK version: 17 Visual Studio Code version: 1.88 Java extension version: 1.29

Steps To Reproduce

1.select "()" 2.click “Rename”

  1. new name "valueOf()"

import static java.lang.String.valueOf; public class OriginalClass { // rename m() to valueOf static String m(int i) { return "1"; } public void test() { System.out.println(valueOf(0)); } }

github-actions[bot] commented 5 months ago

We have found issues that are potential duplicates:

If any of the issues listed above are a duplicate, please consider closing this issue & upvoting/commenting the original one. Alternatively, if neither of the listed issues addresses your feature/bug, keep this issue open.