| Summary: | [move method] 'null' is assigned to 'this' keyword | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jongwook Kim <jongwook.kim> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | noopur_gupta, stolz+bugzilla |
| Version: | 4.2.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Weirdly this feature isn't available if method m is static, which is where I've many times wanted to change first argument into a receiver. Now that I know it at least I can force the issue by refactoring the static method into an instance method first before moving it. Duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=420726. (In reply to Volker Stolz from comment #2) > Duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=420726. Thanks! *** This bug has been marked as a duplicate of bug 420726 *** |
When method m is moved to a, `null' is assigned to `this' keyword: BEFORE REFACTORING ------------------ class A {} class B { void m(A a) { a = null; } } AFTER REFACTORING ------------------ class A { void m() { this = null; // Error } } class B {}