RFR: Mark not subclassable classes final in java.base exported classes

Eirik Bjørsnøs eirbjo at gmail.com
Tue Nov 26 13:22:14 UTC 2024


Hi,

I have drafted a CSR for JDK-8344943 which is now ready for an initial
round of reviews:

https://bugs.openjdk.org/browse/JDK-8345054

The CSR adds the "final" modifier to 21 classes in java.base which are
today "effectively not subclassable", but not marked as such.

In addition to simply adding the final modifier, the CSR suggests minor
updates to the classes DynamicCallSiteDesc, ModuleDescriptor and
InterfaceAddress to better express them being non-subclassable. Owners of
these classes are especially welcome to comment on the CSR.

The specification changes may be easier to read in the draft PR:
https://github.com/openjdk/jdk/pull/22389/files

Thanks,
Eirik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20241126/2b9b0b07/attachment.htm>


More information about the core-libs-dev mailing list