RFR: 8344943: Mark not subclassable classes final in java.base exported classes
Daniel Jeliński
djelinski at openjdk.org
Fri Jan 17 12:28:39 UTC 2025
On Tue, 26 Nov 2024 13:04:41 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
> Please review this PR which adds the `final` modifier to non-subclassable classes in `java.base`.
>
> The classes were identified using an automated analysis. See CSR for details.
>
> Besides simply adding the `final` access modifier, the PR:
>
> * Updates a note in `java.lang.constant.DynamicCallSiteDesc` to not reference subtypes. See CSR for discussion.
> * Removes the class `java.lang.Runtime` from the test `test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java`
> * Updates the copyright year of affected source files
LGTM, the class changes are pretty trivial.
I suppose the CheckCSMs test could be cleaned up a little (will we ever need KNOWN_NON_FINAL_CSMS again?), but that can be done in a separate PR.
-------------
Marked as reviewed by djelinski (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22389#pullrequestreview-2558892291
More information about the net-dev
mailing list