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 Dev (Build 201103130400) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Linux version 2.6.32-29-generic running on i386; UTF-8; en_US (nb) 1. Unzip a project Refactoring to some work directory - there is link: http://wiki.netbeans.org/wiki/images/0/0e/Refactoring_TS_60_Refactoring2.zip 2. Start IDE with a clean userdir 3. Invoke File | Open Project... action 4. Select unzipped project Refactoring 5. Scanning structure of project should be performed (It takes a while) 6. Open file packageA.ClassA 7. Mark code between //7 and //8 8. Refactor -> Introduce Method 9. Perform refactoring 10. Undo changes 11. Try to change the continue command to break and return respectively. According to the Refactoring TS ( http://wiki.netbeans.org/TS_60_Refactoring2 -> Ending with return/break/continue ) expected result is that in the step 3 a new method is created. The original selection is replaced with method call and the last statement ( continue; ) stays as it is. In continue and break case is everything alright, but in case where you change the statement to the return, some unexpected behavior shows up -> return statement doesn't stay as it is and in created method is return statement empty.
implemented in hints module.
http://hg.netbeans.org/jet-main/rev/a9314ebd0aa8
Integrated into 'main-golden', will be available in build *201103160400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a9314ebd0aa8 User: Jan Lahoda <jlahoda@netbeans.org> Log: #196683: IntroduceMethod should not mangle assignments and return statements.
Verified! Works for me. Thanks.