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.
NB 4.2 200508301800 Extract method cannot handle situation when one of the input parameters is vararg type. Steps to reproduce: public int adding(int ... x) { int sum = 0; //------------- begin selection for(int a:x) { sum +=a; } //------------- end selection return sum; } Extract method from selected code Input parameter x of the new method is generated as 'int' instead of 'int[]'.
Checking in src/org/netbeans/modules/refactoring/plugins/ExtractMethodRefactoringPlugin.java; /cvs/refactoring/src/org/netbeans/modules/refactoring/plugins/ExtractMethodRefactoringPlugin.java,v <-- ExtractMethodRefactoringPlugin.java new revision: 1.5; previous revision: 1.4 done Checking in src/org/netbeans/modules/refactoring/ui/ExtractMethodPanel.java; /cvs/refactoring/src/org/netbeans/modules/refactoring/ui/ExtractMethodPanel.java,v <-- ExtractMethodPanel.java new revision: 1.8; previous revision: 1.7 done Fixed on refactoring side. Bug is fixed for described scenario, but still does not work for: public int adding(int[] ... x) problem is, that vararg "int[] ...x" getType() returns "int" but should return Array of int.
Javacore module was replaced by Retouche infrastructure. This bug is not valid in trunk any more.
verified
Reorganization of java component