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.
//--------------------- // Before refactoring. //--------------------- public class SomeThing { boolean dummy[]; } //--------------------- // After refactoring. Netbeans 7.0 //--------------------- public class SomeThing { private boolean dummy[]; /** * @return the dummy */ public boolean dummy[] getDummy() { return dummy; } /** * @param dummy the dummy to set */ public void setDummy(boolean dummy[] dummy) { this.dummy = dummy; } } Observe that "getDummy()" returns "public boolean dummy[] " instead of "public boolean[] ". The problem is, it also includes the array variable name "dummy" in the return segment. In the setDummy() also the same problem. Work around: edit it the wrong getter and setter method manually, after refactoring. Use of getter methods are correctly done, did not test with the setters. Array of doubles work fine. Thanks - sguha
Correction: Happened for array of doubles also. Just double worked fine.
<b>Correction</b>: Problem case: if the array is defined as double arr []; then only the encapsulate refactor creates bad code. Ok Case: If it is defined as double [] arr; then the encapsulate refactor operation works fine.
the problem seems to be in code generator. Refactoring seems to pass all types correctly.
Same root cause as bug #197584. *** This bug has been marked as a duplicate of bug 197584 ***