| Summary: | Refactoring (Move Method) has lost intelligence | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stefan Mandel <Stefan.Mandel> | ||||||
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 4.7 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
Created attachment 268512 [details]
class Used as result of Move Method
Created attachment 268513 [details]
class Used as it should be after Move Method
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. |
Apparently since Neon 3 (or even before) some Move-Method features were removed. I put comments at the methods that are moved very naively: public class User { private Used used; public User() { this.used = new Used(); } public void update() { updateUsedStatic(used); updateUsedNonStatic(used); } // moving this method to class Used will not transform it to an instance method public static void updateUsedStatic(Used used) { used.usage++; } // moving this method to class Used will even add a useless this pointer to the signature public void updateUsedNonStatic(Used used) { used.usage++; } } public class Used { int usage; } Yet the Move-Method-Refactoring is correct - but other IDEs support the full refactoring with removing unnecessary arguments and transforming static methods to instance methods.