<i18n dev> RFR: 8347949: Currency method to stream available Currencies [v3]
Roger Riggs
rriggs at openjdk.org
Fri Jan 17 22:57:36 UTC 2025
On Fri, 17 Jan 2025 22:39:14 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:
>
> init hashset w/ accurate size via HashSet.newHashSet(int)
src/java.base/share/classes/java/util/Currency.java line 439:
> 437: * contains all the available currencies, which may include currencies
> 438: * that represent obsolete ISO 4217 codes. If there is no currency available
> 439: * in the runtime, the returned set is empty. The set can be modified
An apiNote might be appropriate to refer/recommend using the new `availableCurrencies()` API.
And/or an @see link to the method.
src/java.base/share/classes/java/util/Currency.java line 456:
> 454: *
> 455: * @implNote Unlike {@link #getAvailableCurrencies()}, this method does
> 456: * not create a defensive copy of the {@code Currency} set.
An @see link to `getAvailableCurrencies` might be useful.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23165#discussion_r1920844677
PR Review Comment: https://git.openjdk.org/jdk/pull/23165#discussion_r1920846876
More information about the i18n-dev
mailing list