-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6
-
generic
-
generic
###@###.### reports:
$ cat -n Super.java ; cat -n Sub.java
1 class Super {
2 Inner i;
3 private class Inner {
4 void bar() {}
5 }
6 }
1 class Sub extends Super {
2 void foo() { i.bar(); }
3 }
$ javac Super.java Sub.java
No error reported, which seems to violate JLS 6.6.1 (i.bar() should not be accessible).
###@###.### 2004-11-10 04:27:36 GMT
$ cat -n Super.java ; cat -n Sub.java
1 class Super {
2 Inner i;
3 private class Inner {
4 void bar() {}
5 }
6 }
1 class Sub extends Super {
2 void foo() { i.bar(); }
3 }
$ javac Super.java Sub.java
No error reported, which seems to violate JLS 6.6.1 (i.bar() should not be accessible).
###@###.### 2004-11-10 04:27:36 GMT
- duplicates
-
JDK-5003235 Accessibility of private inner class
- Closed