| Summary: | [quick fix] Incorrect quickfix in "Access to a non-accessible member of an enclosing type" warning | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Noam Tamim <noamtm> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | deepakazad |
| Version: | 3.0.1 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Consider this simple test case: // File: test1/Test1.java package test1; public class Test { protected int protectedField; } // File: test2/Test2.java package test2; public class Test2 extends test1.Test { class Nested { int i=protectedField; } } When setting the advanced compiler option "Access to a non-accessible member of an enclosing type" to Warning, Eclipse complains about the access to protectedField - which is okay. BUT it also presents a quick-fix: "Change modifier of 'protectedField' to default visibility". Since the visibility of protectedField is already higher than 'default', it makes no sense.