Community
Participate
Working Groups
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 Rename method refactoring does not rename method in subclass if method in superclass uses generic type. Reproducible: Always Steps to Reproduce: 1. In the example below rename method m to m0 2. Method in subclass will not be renamed 3. There is a compilation error (without @Override the error would not be caught) abstract class C<T> { // RENAME THIS METHOD (this method will be renamed) protected abstract boolean m(T a); } public abstract class RenameMethod<T extends Object> extends C<T> { // RENAME THIS METHOD (this method will not be renamed) @Override protected abstract boolean m(Object a); }
The example is quite weird. RenameMethod#m(Object) doesn't cleanly override C#m(T), but it overrides the erased method C#m(Object). The fix is to change RenameMethod#m(Object) to RenameMethod#m(T). I'll check if we should raise a warning in this case. Filed bug 377169 for a compiler problem that shows up if you flesh out the example.
See also bug 395349.
New Gerrit change created: https://git.eclipse.org/r/71357
Please note the fix for this bug that I submitted is in jdt.core and not in jdt.ui.
Move to 4.8
Bulk move out of 4.9
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.