The following was reported as a regression in 4087314. The problem
unrelated to the failure mode reported there, however, so I am submitting
it as a new bug.
----
The fix for 4087314 appears to have regressed. The compiler
I'm using (which claims to be "1.2beta3") is not transforming
protected nested types to public. Here is an attempt at a
more systematic survey of the modifier bits.
A nested type has two sets of access bits, the transformed and the
untransformed. The latter are stored in the InnerClasses attr.
(repeated for every __reference__ to the class) and the former
are a required part of the classfile format.
A few points about their values:
- the ACC_SUPER bit should not be set in InnerClasses (this is true)
- the ACC_PUBLIC bit should be set in the classfile modifiers if the
untransformed ACC_PROTECTED bit is set (this is __false__ in 1.2beta3,
contrary to the recorded status of bug #4087314)
- if the nested type is an interface, the ACC_INTERFACE and ACC_ABSTRACT
are set in the transformed bitmask
- if the nested type is an interface, the ACC_INTERFACE and ACC_STATIC
are set in the untransformed bitmask (ACC_ABSTRACT should be set also:
nested interfaces are automatically static, just as all interfaces
are automatically abstract)
---
Entered by william.maddox@Eng 1998-02-05, originally reported by jrose.
unrelated to the failure mode reported there, however, so I am submitting
it as a new bug.
----
The fix for 4087314 appears to have regressed. The compiler
I'm using (which claims to be "1.2beta3") is not transforming
protected nested types to public. Here is an attempt at a
more systematic survey of the modifier bits.
A nested type has two sets of access bits, the transformed and the
untransformed. The latter are stored in the InnerClasses attr.
(repeated for every __reference__ to the class) and the former
are a required part of the classfile format.
A few points about their values:
- the ACC_SUPER bit should not be set in InnerClasses (this is true)
- the ACC_PUBLIC bit should be set in the classfile modifiers if the
untransformed ACC_PROTECTED bit is set (this is __false__ in 1.2beta3,
contrary to the recorded status of bug #4087314)
- if the nested type is an interface, the ACC_INTERFACE and ACC_ABSTRACT
are set in the transformed bitmask
- if the nested type is an interface, the ACC_INTERFACE and ACC_STATIC
are set in the untransformed bitmask (ACC_ABSTRACT should be set also:
nested interfaces are automatically static, just as all interfaces
are automatically abstract)
---
Entered by william.maddox@Eng 1998-02-05, originally reported by jrose.
- duplicates
-
JDK-4135234 Application that extends a protected inner class SEGVs on 1.2beta3
-
- Closed
-
-
JDK-4117070 error accessing field of protected inner class inherited from different package
-
- Closed
-