RFR: 8344943: Mark not subclassable classes final in java.base exported classes [v2]

Weijun Wang weijun at openjdk.org
Fri Jan 17 20:05:38 UTC 2025


On Fri, 17 Jan 2025 18:19:56 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
>
> Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update copyright headers for 2025

Marked as reviewed by weijun (Reviewer).

The `DRBGParameters` change looks good. It’s a utility class with static methods and a private constructor, so any attempt to extend it should result in a compile-time error.

-------------

PR Review: https://git.openjdk.org/jdk/pull/22389#pullrequestreview-2559870005
PR Comment: https://git.openjdk.org/jdk/pull/22389#issuecomment-2599101417


More information about the net-dev mailing list