Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 94152

Summary: [quick fix] missing option to raise visibilty of overriding method
Product: [Eclipse Project] JDT Reporter: David Saff <david>
Component: UIAssignee: rgra Missing name <rgransberger>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: Brian.Miller, daniel_megert
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description David Saff CLA 2005-05-09 12:31:23 EDT
On N20050509-0010.  Given this code:

>>>>
package a;

public class Base {
	void doSomething() {
	}
}

class Sub extends Base {
	private void doSomething() {
		
	}
}
<<<<

There's a compile error on doSomething: "Cannot reduce the visibility of the
inherited method from LaunchConfigChange"  The only quick fix is to reduce the
visibility of Base.doSomething.  Shouldn't there also be one to raise the
visibility of Sub.doSomething?
Comment 1 David Saff CLA 2005-05-25 06:08:06 EDT
I'm not sure I agree that this is an enhancement.  2 reasons:

1) Behavior is inconsistent.   If Base.doSomething is public, and
Base.doSomething is protected, the quick fix to raise visibility _is_ offered.

2) The existing quick fix is in error.  If Base is in another class file, then
reducing the visibility of Base.doSomething will not resolve the compilation error.
Comment 2 Brian Miller CLA 2008-07-16 14:48:05 EDT
I agree with comment 1 entirely.

Still happening in 3.4.
Comment 3 Dani Megert CLA 2013-03-12 08:26:56 EDT

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