RFR: 8311030: ResourceBundle.handleKeySet() is racy

Raffaello Giulietti rgiulietti at openjdk.org
Thu Jun 29 12:27:54 UTC 2023


On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov <stsypanov at openjdk.org> wrote:

> Double-checked locking should rely on local variable to avoid racy reads from volatile field.

The role of the local `keySet` seems pretty useless. It doesn't save neither volatile reads nor writes.

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

PR Comment: https://git.openjdk.org/jdk/pull/14692#issuecomment-1613067347


More information about the core-libs-dev mailing list