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.
When I (accidentally) create a method like this: public void getValue(){ // do some stuff } I realize that I missed the return type and statement. If I add this return statement, public void getValue(){ // do some stuff return 42; } NetBeans only shows an error "cannot return a value from method whose result type is void". It would be nice to provide a refactoring hint: "You typed a return statement which doesn't match the current return type. Should I a) remove this return statement, or b) change the return type"
Implemented: http://hg.netbeans.org/main-silver?cmd=changeset;node=11e0fa752767
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/11e0fa752767 User: Jan Lahoda <jlahoda@netbeans.org> Log: #200222: Provide Refactoring if return statement changes
Hi. Great new feature. A couple of suggestion. How about having the option to modify the return type to void of no returns are specified? Also, when implementing a method which overrides a superclass og implements an interface, how about getting the option to modify the signature of the overridden method?