| Summary: | [quick fix] missing option to raise visibilty of overriding method | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | David Saff <david> |
| Component: | UI | Assignee: | 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: | |||
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. I agree with comment 1 entirely. Still happening in 3.4. *** This bug has been marked as a duplicate of bug 394692 *** |
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?