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.

Bug 111567

Summary: [pull up method] Pull up method should not be allowed when different method signatures exist in subclasses
Product: editor Reporter: kely_garcia <kely_garcia>
Component: RefactoringAssignee: issues@java <issues>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description kely_garcia 2007-08-01 00:57:24 UTC
Build ID: Netbeans 6.0 M9 (070502)

Steps To Reproduce:
Pull up method B.m() and set 'Make Abstract' in the following:
class A{}
class B extends A{
	public void m() {
	}
}
class B1 extends A{
	public int m() {
		return 1;
	}
}

Yields the following refactored code:
abstract class A{
    public abstract void m();
}
class B extends A{
	public void m() {
	}
}
class B1 extends A{
	public int m() {
		return 1;
	}
}

The compilation error is: "B1 is not abstract and does not override abstract method A.m()"
This refactoring should return a warning like: "This refactoring is not allower because B1.m() has a different return 
type than its moved counterpart B.m()"
Comment 1 David Strupl 2009-03-31 15:57:31 UTC
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".
Comment 2 Quality Engineering 2009-11-02 11:18:19 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX