RFR: 7903932: Make private static classes final and have a private constructor

Per Minborg pminborg at openjdk.org
Fri Jan 17 12:33:53 UTC 2025


On Fri, 17 Jan 2025 07:41:53 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

> Please review this patch to make static utility classes final with a private constructor, as they are not meant to be extended.
> 
> This is a small refractor of the generated code.
> 
> TIA

This looks good to me.

As we have manually made these edits during our panamization efforts, I think this is a convenient change for us. As pointed out above, these classes are private so, making them `final` to adhere to the "utility class pattern" is not a risk.

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

Marked as reviewed by pminborg (no project role).

PR Review: https://git.openjdk.org/jextract/pull/274#pullrequestreview-2558903432
PR Comment: https://git.openjdk.org/jextract/pull/274#issuecomment-2598264753


More information about the jextract-dev mailing list