> On Jul 1, 2016, at 8:16 AM, Daniel Fuchs <daniel.fu...@oracle.com> wrote:
> 
> 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…

Why is this extra checkPermission necessary? 

Mandy

Reply via email to