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

Justin Lu jlu at openjdk.org
Fri Nov 1 23:21:56 UTC 2024


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.

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

Commit messages:
 - init

Changes: https://git.openjdk.org/jdk/pull/21845/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21845&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8343237
  Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/21845.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21845/head:pull/21845

PR: https://git.openjdk.org/jdk/pull/21845


More information about the core-libs-dev mailing list