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

Eirik Bjørsnøs eirbjo at openjdk.org
Tue Nov 26 21:00:56 UTC 2024


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.

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

Commit messages:
 - Make package-private ModuleDescriptor constructor private

Changes: https://git.openjdk.org/jdk/pull/22399/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22399&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8345075
  Stats: 13 lines in 1 file changed: 0 ins; 0 del; 13 mod
  Patch: https://git.openjdk.org/jdk/pull/22399.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22399/head:pull/22399

PR: https://git.openjdk.org/jdk/pull/22399


More information about the core-libs-dev mailing list