Project: JDT
Bug 84924 Move instance method should allow to move to declaring class
Reported: 2005-02-10 13:59:27 | Status: resolved fixed

I20050209-0800 Move instance method should allow to move to the method's declaring class. I had code like this (somewhat more complicated, actually the method was a static method which I have moved to A): class A { void m(A a) { a.hashCode(); } } The refactoring didn't allow me to move A#m(A) to parameter 'A a'. I don't see why this is not allowed. Removing "&& !Bindings.equals(declaring, binding)" from MoveInstanceMethodProcessor#computeTargetCategories(..) worked fine (apart from an error message that a method 'm' already exists).

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java