On Sun, 19 Feb 2023 18:41:18 GMT, liach <d...@openjdk.org> wrote:

> 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not 
> thread safe

I think of this pattern of reading a to-be-lazily-initialized value into a 
local as simple hygiene, `volatile` or not. The code might seem solid without 
it - but stranger things than eliding a field load has happened. Storing into 
the local variable removes some doubt about how this code will be executed.

-------------

PR: https://git.openjdk.org/jdk/pull/12643

Reply via email to