Integrated: 8344231: SecurityManager cleanup in java.lang.module and jdk.internal.module

Eirik Bjørsnøs eirbjo at openjdk.org
Fri Nov 15 19:24:00 UTC 2024


On Thu, 14 Nov 2024 17:32:40 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

> Please review this PR which removes code depending on SecurityManager from the `java.lang.module` and `jdk.internal.module` packages:
> 
> * `ModuleFinder::ofSystem` is updated to not check the `"accessSystemModules"` RuntimePermission
> * The `ModuleReferences.ExplodedModuleReader` constructor is updated to remove the check that the caller has access to the directory.
> * `Modules::addProvides` is updated to not use `AccessController::doPrivileged` when getting the module class loader
> * `SystemModuleFinder::ofSystem` is updated to not returned a wrapped result calling `AccessController::doPrivileged`
> * `SystemModuleFinders.SystemImage` is updated to remove a class level comment referring to the SM
> * `SystemModuleFinders.SystemModuleReader::checkPermissionToConnect` is removed. The URI constructor parameter in `SystemModuleReader` becomes unused and is removed.
> 
> 
> Testing: I have run `test/jdk/java/lang/module`, `test/jdk/java/lang/ModuleTests`,  and `test/jdk/java/lang/ModuleLayer` successfully. GHA results pending.

This pull request has now been integrated.

Changeset: f62e05ee
Author:    Eirik Bjørsnøs <eirbjo at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f62e05ee96085675041c5cb94762f78abbc89783
Stats:     68 lines in 4 files changed: 0 ins; 60 del; 8 mod

8344231: SecurityManager cleanup in java.lang.module and jdk.internal.module

Reviewed-by: alanb

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

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


More information about the core-libs-dev mailing list