RFR 8159245: Loggers created by system classes are not initialized correctly when configured programmatically from application code.
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Jul 1 15:16:20 UTC 2016
On 01/07/16 16:09, Mandy Chung wrote:
> I was thinking to move the entire doPrivileged block to mergeWithSystemLogger that will look like:
>
> if (cfg == system.config) {
> return;
> }
>
> // sanity check
> if (!system.isSystemLogger ….
> throw new InternalError(…);
>
> final ConfigurationData cfg = config;
> AC.doPrivileged(...
> config = cfg.merge(system);
> )
>
>
> 577 checkPermission();
>
> Is this necessary? Is it be covered by the merge method?
I'd prefer to keep the doPrivileged in LogManager so that
Logger.mergeWithSystemLogger can call checkpermission().
From a conceptual point of view it's only when calling
this method from LogManager that we want to be privileged,
even though the method is package private and only called
from LogManager...
best regards,
-- daniel
More information about the core-libs-dev
mailing list