RFR: 8345075: java.lang.module.ModuleDescriptor constructor could be made private

Alan Bateman alanb at openjdk.org
Thu Nov 28 17:22:38 UTC 2024


On Tue, 26 Nov 2024 20:48:24 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

> Please consider this cleanup PR which makes the now package-protected `ModuleDescriptor` constructor private.
> 
> This constructor is only accessed by the class itself via JavaLangModuleAccess. Making it private would express the intent of this class as being non-subclassable.
> 
> Marking this class final is handled separately in JDK-8344943 via a CSR.

Okay.

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

Marked as reviewed by alanb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22399#pullrequestreview-2468622982


More information about the core-libs-dev mailing list