Bug 41597 move instance method: fails for "this"-qualified field access [refactoring]
Field accesses of the form this.s are not handled properly. Note that they need different behavior depending on context: - As target of a MethodInvocation: => implicit "this" => remove it. - Otherwise: explicit "this". Example: move A::print() to field s ----------------------------------- package p; public class A { Second s; Second s2; public void print() { int s= 17; this.s.foo(s2); this.s2.foo(this.s); } } package p; class Second { public void foo(Second s) { } }
org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test12/out/B.java
package p2;
public class B {
	public void mB1() {}
	
	public void mB2() {}
	
	public void mA1(float j, int foo, String bar) {
		mB1();
		System.out.println(bar + j);
	}
}