| Summary: | [quick fix] Wrong quick fixes when accessing protected field in subclass in different package | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Bassam Jabbour <bassam.jabbour> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, Olivier_Thomann |
| Version: | 3.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Bassam Jabbour
Moving to JDT/UI. Could you please provide an example that fails? [file 1]
package a;
public class Base {
protected int myField;
}
[file 2]
package b;
import a.Base;
public class Child extends Base {
public void aMethod(Base parent) {
System.out.println (parent.myField);
}
}
This example rightfully fails to compile, but the proposed Quickfix is "change visibility of myField to protected", which is already the case.
|