CSR review for 8238358: Implementation of JEP 371: Hidden Classes
mandy.chung at oracle.com
Tue Mar 17 20:53:54 UTC 2020
The javadoc and specdiff have been updated in place to reflect the
recent discussion  to change the default of hidden classes that a
hidden class may be unloaded even when the defining loader is reachable
unless `ClassOption::STRONG` is specified such that the hidden class has
the same strong relationship with its defining loader as the normal
class has with its own defining loader.
JVMS 5.4.4 change:
On 3/9/20 2:00 PM, Mandy Chung wrote:
> Please review the CSR proposed for JEP 371 Hidden Classes .
> JVMS 5.4.4 change:
> A brief summary of the changes:
> 1. A new Lookup::defineHiddenClass method is the API to create a
> hidden class.
> 2. A new Lookup.ClassOption enum class defines NESTMATE and WEAK
> option that
> can be specified when creating a hidden class.
> 3. A new Class::isHiddenClass method tests if a class is a hidden class.
> 4. Field::setXXX method will throw IAE on a final field of a hidden class
> regardless of the value of the accessible flag.
> 5. Class::getNestMembers is updated not to throw any exception when it
> to validate the nest membership. Instead this method will return all
> members that are listed in `NestMembers` attribute if present and
> determined to have the same nest host as this class.
> We uncovered a bug in Lookup::defineClass spec throws LinkageError and
> to have the newly created class linked. However, the implementation
> in 14
> does not link the class. A separate CSR proposes to update the
> to match the spec - please also review:
> This is tracked as a separate JBS issue JDK-8238195 that is fixed in
> this patch.
> The code review will be posted separately.
>  https://openjdk.java.net/jeps/371
>  JDK-8230502 Add support in JVM TI and JDI for hidden classes
>  JDK-8219607 Add support in Graal and AOT for hidden and weak class
More information about the core-libs-dev