This code is ultimately invoked from BeanLinker constructor, so always on a 
single thread; there’s no race here. putIfAbsent was used here previously 
solely for its effect of not replacing existing mappings, not because of its 
atomicity.

Attila.

> On 2018. Dec 5., at 15:45, Jim Laskey <james.las...@oracle.com> wrote:
> 
> Wouldn’t you still use innerClasses.putIfAbsent in case there is a race?
> 
>> On Dec 5, 2018, at 10:33 AM, Hannes Wallnöfer <hannes.wallnoe...@oracle.com> 
>> wrote:
>> 
>> Please review:
>> 
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8214795
>> Webrev: http://cr.openjdk.java.net/~hannesw/8214795/webrev.00/
>> 
>> This is to make sure we use the right inner classes regardless of the order 
>> of classes returned by Class.getClasses().
>> 
>> Thanks,
>> Hannes
> 

Reply via email to