Bug 313041

Summary: [rename] Renaming method leads to compilation error due to reduce visibility of inherited method
Product: [Eclipse Project] JDT Reporter: Gustavo Soares <gsoares>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Gustavo Soares CLA 2010-05-16 14:11:09 EDT
Build Identifier: 20090920-1017

Renaming a method leads to reduce the visibility of an inherited method, which is not allowed in Java.

Reproducible: Always

Steps to Reproduce:
1. Create the classes

public class A {
	public void k() {}
}
public class B extends A{
	private void n() {}
}
2. Apply the rename method refactoring to n renaming it to k


public class A {
	public void k() {}
}
public class B extends A{
	private void k() {}
}

3. The resulting code doesn't compile. Error: cannot reduce the visibility of inherited method.
Comment 1 Dani Megert CLA 2010-05-18 09:16:00 EDT

*** This bug has been marked as a duplicate of bug 233712 ***