| Summary: | Same named templated method name refactoring fails | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Bence Sipka <sipkab> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 4.7.1a | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| Whiteboard: | stalebug | ||
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. |
Given a class with two templated methods which have the same name: public static <T extends TypeMirror> T method(T param) { return null; } public static <T extends Element> T method(T param) { return null; } If I try to rename any of the methods with the Alt + Shift + R hotkeys it gives the following error: The refactoring 'Rename Method' (org.eclipse.jdt.ui.rename.method) cannot be performed, since its input does not exist. When I try to edit the method signature (Change Method Signature dialog), and rename the method to something else, BOTH of the methods get renamed, which is not the expected result. Also, any other operations will result on both of the methods edited. (For example, adding a parameter gets added to both. Also, when I try to rename the type variable with Alt + Shift + R, the type variable renaming works, but executes on the FIRST declared method. When I rename the type parameter variable to something else: public static <T extends TypeMirror> T method(T param) { return null; } public static <E extends Element> E method(E param) { return null; } This way the renaming works as expected.