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.
NetBeans 6.0 RC2: Try "Encapsulate field" for "h" in the following codes and uncheck "Use Accessors Even When Field Is Accessible" option It works in NB5.5.1. -- public class Main{ class A{ int h; } class B extends A{ void m(){ System.out.println(h); } } } -- Result NB6.0: h should be getH() in method m. -- public class Main{ class A{ private int h; public int getH() { return h; } public void setH(int h) { this.h = h; } } class B extends A{ void m(){ System.out.println(h); } } } -- Result NB5.5.1: it's correct. -- public class Main { class A{ private int h; public int getH() { return h; } public void setH(int h) { this.h = h; } } class B extends A{ void m(){ System.out.println(getH()); } } } --
It fails in case you place everything to one file. If subclasses are placed to separate files or another top level class the refactoring works as expected. I will improve the checking.
Fixed in 1b7d607afa93.