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 jdk8lambda-1727-on-20130516) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_21 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01 I have the class: public static class Duet { int x, y; Duet() {} { this.x = 0; this.y = 0; } } I wanted to create getters and setters. In the dialog Generate Getters and Setters I have checked the class (and so both its fields) and the "Encapuslat Field" option. NB modified the clas into the form: public static class Duet { private int x; int x; //<- Here is the error private int y; Duet() { this.x = 0; this.y = 0; } //Follows the correctly generated getters and setters }
Reported a long ago, and works in current dev trunk. I remember that I tweaked a lot breaking 'field groups' around 2014 or so. Anyway, this bug would reside in code generator, refactoring only issues an abstract command to rewrite x, y with forms with private modifier.