Project: JDT
Bug 33473 [Refactoring] "Change method signature" changes more than one method
Reported: 2003-02-27 13:58:23 | Status: resolved fixed

Eclipse 2.1 RC1, win2k Test case: New java project, create interface I such that: interface I { void method(Integer i, Object o); } then create class C such that: class C implements I { public void method(Integer i, Object o) { } public void method(Double d, Object o) { } } Now, select the second method of class C, choose "Change Method Signature" from refactoring menu, Eclipse gives a warning that this method is required to implement ineterface I (it's got the wrong method). Go ahead with the refactoring, remove the second parameter, and Eclipse removed the second parameter from both methods in class C AND from the method declaration in interface I. Oddly enough, if you now re-select any of the methods in class C, that particular refactoring option has vanished from the menu. Not sure if that's a related problem or not.

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureRefactoring.java