Bug 313041 - [rename] Renaming method leads to compilation error due to reduce visibility of inherited method
Summary: [rename] Renaming method leads to compilation error due to reduce visibility ...
Status: CLOSED DUPLICATE of bug 233712
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-16 14:11 EDT by Gustavo Soares CLA
Modified: 2010-05-18 09:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***