-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.3.0
-
sparc
-
solaris_2.5.1
Name: aaC67449 Date: 11/01/99
oldjavac incorrectly interdict inheriting of protected inner classes, when the
nesting level of inner class is more then 1.
See example:
----------------- example -----------
------ A.java ----
package test;
public class A {
protected class AInner1 {
protected AInner1() {}
protected class AInner2 {
protected AInner2() {}
}
}
}
----- B.java ------
class B extends test.A {
public class BInner1 extends AInner1 {
public BInner1() {
super();
}
public class BInner2 extends AInner2 {
public BInner2() {
super();
}
}
}
}
------------------oldjavac output--------------
#>oldjavac -d . A.java B.java
B.java:8: Inner type AInner1 in class test.A not accessible from inner class B. BInner1.BInner2.
public class BInner2 extends AInner2 {
^
1 error
--------------------------
All works correctly in new javac.
But the oldjavac is a reference platform for JCK, and some JCK tests are not
compiled. So the bug in the oldjavac should be fixed.
---------------- output ----------
Failed. The method returns null
======================================================================