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 f on the following: public class A { String f; public static void main( String[] args){ B b=new B(); b.setF("abcd"); } } class B extends A { public int setF( String theField){ this.f=theField; return 2; } } Yields the following refactored code: public class A { private String f; public static void main( String[] args){ B b=new B(); b.setF("abcd"); } public String getF() { return f; } public void setF(String f) { this.f = f; } } class B extends A { public int setF( String theField){ this.setF(theField); return 2; } } The compilation error is: "setF(String) in B cannot override setF(String) in A; attempting to use incompatible return type"
Valid for 5.5. Encapsulate fields not implemented in M10. Planned for beta1. Need to be reevaluated when implemented. Should be resolved for 6.0
Created attachment 55917 [details] NPE stack trace
NPE thrown when trying to reproduce this issue in nb 6.1 dev builds.
NPE no longer thrown, the reported problem reproducible. Refactoring could detect this kind of conflict and display a warning.
*** Issue 108474 has been marked as a duplicate of this issue. ***
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