On Wed, 20 Nov 2024 19:39:58 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: a62279ca
Author:    Daniel Fuchs <dfu...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/a62279ca0a520fdf4bce77dec4cb06d4d573c109
Stats:     954 lines in 17 files changed: 47 ins; 748 del; 159 mod

8344235: Revisit SecurityManager usage in java.logging after JEP 486 and JEP 
491 integration

Reviewed-by: jpai

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

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

Reply via email to