<Sound Dev> RFR: 8272756: Remove unnecessary explicit initialization of volatile variables in java.desktop

Sergey Bylokhov serb at openjdk.java.net
Mon Aug 23 18:00:28 UTC 2021


On Mon, 23 Aug 2021 13:08:02 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Looks like there's no purpose, `tags` is not used after assignment
>
> Maybe it's kind of a protection from a race. Yet it's possible either way: another thread could see `essentialTags == null` before this one initialises the field.

I think we can drop it completely.

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

PR: https://git.openjdk.java.net/jdk/pull/5197


More information about the sound-dev mailing list