RFR: 8343237: Improve the copying of the available set of Currencies

Brian Burkhalter bpb at openjdk.org
Sat Nov 2 01:29:27 UTC 2024


On Fri, 1 Nov 2024 23:17:01 GMT, Justin Lu <jlu at openjdk.org> wrote:

> Please review this PR which is a small cleanup in `Currency.getAvailableCurrencies()`. We can use the `HashSet` constructor over `clone()` to make the defensive copy of the set of available currencies. This gets rid of the unsightly unchecked cast and SuppressWarnings annotation.

Looks fine.

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

Marked as reviewed by bpb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21845#pullrequestreview-2411110241


More information about the core-libs-dev mailing list