<i18n dev> RFR: 8347949: Currency method to stream available Currencies [v5]

Chen Liang liach at openjdk.org
Sat Jan 18 01:36:35 UTC 2025


On Fri, 17 Jan 2025 23:33:50 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> Please review this PR and CSR which adds a method to _java.util.Currency_ which returns a stream of the available Currencies.
>> 
>> The motivation can be found in the CSR.
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   provide message for test assertion

test/jdk/java/util/Currency/AvailableCurrenciesTest.java line 46:

> 44:         assertEquals(currencies, Currency.availableCurrencies().collect(Collectors.toSet()),
> 45:                 "availableCurrencies() and getAvailableCurrencies() do not have the same elements");
> 46:     }

Should we add a test to ensure `Currency.availableCurrencies()` has no duplicate elements?


Currency.availableCurrencies().collect(Collectors.toMap(Function.identity(), Function.identity());

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23165#discussion_r1920922876


More information about the i18n-dev mailing list