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.0.1 (Build 201107102202) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Windows XP version 5.1 running on x86; Cp1252; 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 //6 and //7 8. Refactor -> Introduce Method 9. Try to change the continue command to break and return respectively and repeat steps 2) and 3). 10. Comment out the line "s = s+"--, ";" and try again According to the Refactoring TS ( http://wiki.netbeans.org/TS_60_Refactoring2 -> Illegal refactoring - selection contains return/break/continue ) expected result is that the error message "Too many output parameters" is displayed at first. After commenting out the specified line, the refactoring can be performed and semantic of the code is not changed. But if you don't comment out the line "s = s+"--, ";" and if you change the command continue to return a new boolean method is created.
Implemented in hints module
When the first "continue" is replaced with "return", the value assigned to "s" cannot be used in the calling method anyway, and the method can be introduced. This changed in 7.0.1 as a consequence of (more) precise flow analysis, and we are not going to change it.