<i18n dev> RFR: 8282319: java.util.Locale method to stream available Locales

Justin Lu jlu at openjdk.org
Thu Feb 23 08:48:45 UTC 2023

This PR proposes introducing a new method to Locale which returns Stream<Locale>

It involves adding an additional method to _LocaleServiceProviderPool_ that returns Stream, which _Locale_ can call.

`LocaleServiceProviderPool.streamAllAvaliableLocales()` does not need a defensive copy of `AllAvailableLocales.allAvailableLocales` unlike `LocaleServiceProviderPool.getAllAvaliableLocales()` as the array is hidden by the Stream.


Commit messages:
 - Adjust test for new method name
 - Update specification for method
 - Update impl to use @since, {@return..., @implNote
 - Further revert of name change
 - Revert changed var name
 - There is no need to retain the set, Stream the array directly
 - Adjust err msg
 - Run w/ data provider
 - Tweak var names
 - Merge branch 'master' into 8282319-Locale-Stream
 - ... and 2 more: https://git.openjdk.org/jdk/compare/7eff5787...6df5c168

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

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

More information about the i18n-dev mailing list