Project: JDT
Bug 411529 [move method refactoring] reference to protected method
Reported: 2013-06-24 14:42:53 | Status: resolved fixed

package p; public class A { protected void m(){} } package p; public class B { public void n(q.C c, A a) { a.m(); } } package q; public class C { } When p.B.n(q.C, A) is moved to q.C, Eclipse move-refactoring pops up a warning message: "The visibility of method `p.A.m()' will be changed to public." When I click the `continue' button to finish the refactoring, p.A.m() is still `protected' (no changes). That is an error.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test48/in/A.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test48/in/B.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test48/in/C.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test48/out/A.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test48/out/B.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInstanceMethod/canMove/test48/out/C.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInstanceMethodTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java