RFR: 7113878: LogManager - namedLoggers should be ConcurrentHashMap instead of Hashtable
Daniel Fuchs
daniel.fuchs at oracle.com
Mon Mar 30 17:03:09 UTC 2015
On 27/03/15 22:47, Mandy Chung wrote:
> On 3/27/15 4:27 AM, Daniel Fuchs wrote:
>> Here is a new webrev - with Peter's suggestion implemented.
>> I also made a few tweaks to the test.
>>
>> http://cr.openjdk.java.net/~dfuchs/webrev_7113878/webrev.01/
>
>
> This version looks good to me. With this change to use CHM,
> we could modernize the code further and that's for some other day.
Thanks Mandy.
> I think the removeLoggerRef andgetLoggerNames method don't
> need to be synchronized either - any reason why they are
> kept synchronized?
Yes. getLoggerNames() calls ensureInitialized().
There may be a possibility to improve synchronization
there too but that will be more complex.
removeLoggerRef is already called from within a
synchronized block on LoggerContext - so there is nothing
to gain here.
>
> line 659: indent to the right
> line 660: nit - 4-space indentation.
Well spotted! Fixed in my repository.
best regards,
-- daniel
>
> Mandy
>
More information about the core-libs-dev
mailing list