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.1 (Build 201112071828) Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) 1. Unzip a project default to some work directory - there is link: http://wiki.netbeans.org/wiki/images/2/2e/Default_STS_68_Refactoring.zip 2. Start IDE with a clean userdir. 3. Invoke File | Open Project... action. 4. Select unzipped projects default. 5. Scanning structure of project should be performed (it takes a while). 6. Put caret over make(int index, String s, Bean bean) in the org.netbeans.tests.examples.packc.Makable class. 7. Invoke Refactoring | Change Method Parameters action from the popup menu 8. Add new argument of type "int...", fill in some name 9. Enter 1,2,3 as default value 10. Perform refactoring EXPECTED RESULT: The refactoring cannot continue if vararg parameter is not at the last position. If refactoring is performed method declaration is modified as expected and provided default values are added to all calls of refactored method (Note you have to set project source level to 1.5) (10 occurrences) According to the Refactoring Test Specifications ( http://wiki.netbeans.org/TS_60_Refactoring -> Vararg ) expected result is that the when refactoring is performed method declaration is modified as expected and provided default values are added to all calls of refactored method. But instead of changing method make in class Makable on line 18 from: public void make(int index, String s, Bean bean); to public void make(int index, String s, Bean bean, int... name); it is changed to: public void make(int index, java.lang.String s, org.netbeans.tests.examples.packa.Bean bean, int...... name); Where problem is three extra dots, so project is no longer compilable. Note: this is happening to all occurrences of method make, not only in Makable class. P.S.: I'm not sure if changing type from relative to full path is correct behavior.
changeset : http://hg.netbeans.org/jet-main/rev/350695c40389 author : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date : Mon Feb 06 13:20:47 CET 2012 summary : Issue #208022 - Refactoring Change Method Parameters - adding varargs doesn't work correctly Changing of the type to the fqn is also fixed.
Product Version: NetBeans IDE Dev (Build 201202130400) Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Veryfied, works for me now :) . Thanks.
Transplanted to release71_fixes: 7d085a94b1c2 8f393ef82324
Integrated into 'releases', will be available in build *201202132200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/7d085a94b1c2 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: Issue #208022 - Refactoring Change Method Parameters - adding varargs doesn't work correctly
verified in patch1