On Sat, 18 Jan 2025 01:29:01 GMT, Chen Liang <li...@openjdk.org> wrote:
>> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> provide message for test assertion > > src/java.base/share/classes/java/util/Currency.java line 469: > >> 467: >> 468: // Initialize the set of available currencies if needed >> 469: private static synchronized void initAvailableCurrencies() { > > Should we make `available` volatile so we can avoid entering the monitor if > the currencies are initialized? > > (Note: We may get Stable Values very soon, at that point SV is a much better > solution) Thanks Chen, made `available` volatile and implemented DCL in https://github.com/openjdk/jdk/pull/23165/commits/96e86c800f1d1af1c20bfee944c298f17b7e8860. Also added a duplicate elements test as you suggested. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23165#discussion_r1924213435