This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version: NetBeans IDE 7.3 (Build 201302132200) Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11 System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb) User directory: C:\Users\Gili\AppData\Roaming\NetBeans\7.3 Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\7.3 When Rename Method is used against a method and that method is line-wrapped in the source-code, the operation ends up corrupting the source-code. Repro steps: 1. Given: public class Testcase { public Testcase getSelf() { return this; } public static void main(String[] args) { Testcase testcase = new Testcase(); testcase.getSelf().getSelf().getSelf().getSelf().getSelf().getSelf().getSelf().getSelf(). getSelf().getSelf().getSelf().getSelf().getSelf().getSelf(); } } 2. Place caret on getSelf(), hit CTRL+R and rename the method to getSelf2(). 3. The output will be: public class Testcase { public Testcase getSelf2() { return this; } public static void main(String[] args) { Testcase testcase = new Testcase(); testcase.getSelf2().getSelf2().getSelf2().getSelf2().getSelf2().getSelf2().getSelf2().getSelf2().getSelf2Self().getSelf2().getSelf2().getSelf2().getSelf2().getSelf2(); } } 4. Notice the output contains two bugs: a. The line-wrapped reference gets renamed to getSelf2Self() instead of getSelf2() b. The line wrapping is removed and the method invocation now shows up on a single line.
Seems to be already fixed in the latest dev-builds. Reproducible in 7.3, but not in today's build.