The compiler deny access to the protected inner class by using its full name.
See example.
If "A.AInner" change to "AInner", all works correcly.
This bug appears in the JDK1.3.0rc2-V, JDK1.3.0rc2-U compiler works correctly.
-------------------example ---------------------
------------- A.java --------------------
package test;
public class A {
protected class AInner {
}
}
------------ B.java ------------------
import test.A;
class B extends A {
public class BInner extends A.AInner {
}
}
---------------- 1.3.0rc2-V output ---------------
#>javac -d . A.java B.java
B.java:4: test.A.AInner has protected access in test.A
public class BInner extends A.AInner {
^
1 error
-----------------1.3.0rc2-U--------------
#>javac -d . A.java B.java
----------------------------------------
See example.
If "A.AInner" change to "AInner", all works correcly.
This bug appears in the JDK1.3.0rc2-V, JDK1.3.0rc2-U compiler works correctly.
-------------------example ---------------------
------------- A.java --------------------
package test;
public class A {
protected class AInner {
}
}
------------ B.java ------------------
import test.A;
class B extends A {
public class BInner extends A.AInner {
}
}
---------------- 1.3.0rc2-V output ---------------
#>javac -d . A.java B.java
B.java:4: test.A.AInner has protected access in test.A
public class BInner extends A.AInner {
^
1 error
-----------------1.3.0rc2-U--------------
#>javac -d . A.java B.java
----------------------------------------