Community
Participate
Working Groups
Build ID: M20080221-1800 Steps To Reproduce: 1. Create the following files in an eclipse project: //---------- com.b.p1.A.java ------------------------- package com.b.p1; public class A<K> { protected final class Inner {} } //---------- com.b.p1.ADerivedSamePkg.java ------------ package com.b.p1; import java.util.Map; public class ADerivedSamePkg extends A<Object> { protected void someMethod() { Map.Entry<String, Inner> some = null; Inner x = some.getValue(); } } //---------- com.b.p2.ADerivedDifferentPkg.java ---------- package com.b.p2; import java.util.Map; import com.b.p1.A; public class ADerivedDifferentPkg extends A<Object> { protected void someMethod() { Map.Entry<String, Inner> some = null; Inner x = some.getValue(); // <-- error in this line } } 2. The line: Inner x = some.getValue(); in class ADerivedDifferentPkg will be flagged as in error: The type A<K>.Inner is not visible It shouldn't be, because class ADerivedDifferentPkg derives from A, and class A.Inner is protected, available to all derived classes, not just those in the same package! More information: In the Europa fall release this works as expected, i.e. it is not marked as error.
Dup of bug 216692. *** This bug has been marked as a duplicate of bug 216692 ***
Fix is available in 3.4 and in 3.3 maintenance branch post 3.3.2. A patch is posted at: http://www.eclipse.org/jdt/core/r3.3/index.php#UPDATES (use the 3.3.3 preview)
Added GenericTypeTest#testr1329