Community
Participate
Working Groups
Take the following two classes: public class ExtractMethodDemo extends SuperClass { private String subMethod(){ return "SubClass"; } } class SuperClass{ public String someMethod(){ //extract from here... return "SuperClass"; //...to here } } Run Extract Method on the indicated piece of code, calling the new method "subMethod" and setting it to public. Code no longer compiles! You can get a similar effect by making the extracted function's return type different from the return type of the shadowed method.
Move to JDT/UI
Currently the refactoring correctly warns you if you try to introduce a new method in a subclass if it has the same signature as a method in the superclass. Comment 0 states the opposite direction which is currently not warned. Markus, thinking of javas open-world assumption, should we warn the user in this case?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Still a problem in 4.12 M1.