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.
Build ID: 200609161800 (Netbeans 6.0 M3) Steps To Reproduce: Encapsulate field "theField" on the following: public class A { String theField; public static void main( String[] args){ B b=new A().new B(); System.out.println(b.getTheField()); } class B extends A { private String getTheField(){ return theField; } } } Yields the following refactored code: public class A { private String theField; public static void main( String[] args){ B b=new A().new B(); System.out.println(b.getTheField()); } class B extends A { private String getTheField(){ return getTheField(); } } public String getTheField() { return theField; } public void setTheField(String theField) { this.theField = theField; } } The compilation error is: "cannot override getTheField(); attempting to assign weaker access privileges"
Valid for 5.5. Encapsulate fields not implemented in M10. Planned for beta1. Need to be reevaluated when implemented.
Resolving all issues with milestone "future" as LATER. If you feel strongly that it should be implemented please reopen and set the target milestone to "next".
NetBeans.org Migration: changing resolution from LATER to WONTFIX
*** Bug 201141 has been marked as a duplicate of this bug. ***
This is still valid in 7.0.1
Changeset: ad655b14df3e Author: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Date: 2012-05-28 14:25 Message: Issue #108473 - [encapsulate field] Encap. field that has a getter yields comp. error
Integrated into 'main-golden', will be available in build *201205290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ad655b14df3e User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: Issue #108473 - [encapsulate field] Encap. field that has a getter yields comp. error