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 8.1 RC2 (Build 201510122201) Operating System = Windows 10 version 10.0 running on amd64 Java; VM; Vendor = 1.8.0_66 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.66-b17 Reproducibility: Happens every time STEPS: Create Java class like this: public class NewClass { int x, y; } Call up 'Generate' menu (ALT+INSERT) Select 'Getter and Setter...' Select all fields and select 'encapsulate fields' Press 'Generate' ACTUAL: Modifications to class look like this: public class NewClass { private int x; int y; public int getX() { return x; } public void setX(int x) { this.x = x; } private int y; public int getY() { return y; } public void setY(int y) { this.y = y; } } Note double definition of 'y' EXPECTED: Modifications to class look like this: public class NewClass { private int x; public int getX() { return x; } public void setX(int x) { this.x = x; } private int y; public int getY() { return y; } public void setY(int y) { this.y = y; } } WORKROUND: Don't declare > 1 field per line
reproducible