CSR review for 8238358: Implementation of JEP 371: Hidden Classes
mandy.chung at oracle.com
Mon Mar 9 21:00:57 UTC 2020
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
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 fails
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
The code review will be posted separately.
 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 valhalla-dev