RFR: 8344235: Revisit SecurityManager usage in java.logging after JEP 486 and JEP 491 integration [v2]
Daniel Fuchs
dfuchs at openjdk.org
Thu Nov 21 10:24:28 UTC 2024
> This PR remove usage of SecurityManager, doPrivileges, etc... from `java.logging` and `java.base/jdk.internal.logger`
>
> Only notable hack - Logger.checkPermission() no longer checks permissions, but has been renamed into `ensureLogManagerInitialized()` in order to avoid disturbing the initialization sequence of Logger/LogManager.
>
> I am not 100% sure this is still needed - but I remember we had some entanglement issues in the past that had been hard to solve, so it seemed prudent to keep the call:
>
>
> if (manager == null) {
> manager = LogManager.getLogManager();
> }
>
>
> where `manager` is a private volatile field in Logger.
>
> I also took the opportunity to remove the locking workaround that had been introduced to support Virtual Threads and revert to using synchronized in the Handler classes now that JEP 491 has been integrated.
Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
Review feedback
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22281/files
- new: https://git.openjdk.org/jdk/pull/22281/files/169e8c20..ef8b71e1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22281&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22281&range=00-01
Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/22281.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22281/head:pull/22281
PR: https://git.openjdk.org/jdk/pull/22281
More information about the core-libs-dev
mailing list