RFR 8159245: Loggers created by system classes are not initialized correctly when configured programmatically from application code.
Mandy Chung
mandy.chung at oracle.com
Fri Jul 1 15:09:01 UTC 2016
> On Jul 1, 2016, at 7:09 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
>
>
> OK. I was concerned about the cost of creating a doPrivileged call
> for nothing - but then reflected that system classes usually call
> getLogger only once for a specific logger - at which point the
> doPrivileged will be needed anyway (only for subsequent calls
> of getLogger with the same name would it be superfluous).
>
> Here is the new webrev:
>
> http://cr.openjdk.java.net/~dfuchs/webrev_8159245/webrev.06/
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?
Mandy
More information about the core-libs-dev
mailing list