RFR: 8282023: PropertiesStoreTest and StoreReproducibilityTest jtreg failures due to en_CA locale [v3]
Naoto Sato
naoto at openjdk.java.net
Fri Feb 25 04:48:05 UTC 2022
On Fri, 25 Feb 2022 03:51:09 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> test/jdk/java/util/Properties/PropertiesStoreTest.java line 112:
>>
>>> 110: locales.add(Locale.getDefault()); // always test the default locale
>>> 111: locales.add(Locale.US); // guaranteed to be present
>>> 112: locales.add(Locale.ROOT); // guaranteed to be present
>>
>> Can we assume the returned `Set<Locale>` is mutable? `Collectors.toSet()` javadoc reads no guarantee for mutability.
>
> That's a very good point. I've updated the PR to now explicitly use a mutable `Set` instead of using `Collectors.toSet()`
This is ok, although `Collectors.toCollection(HashSet::new)` is a bit concise.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7558
More information about the core-libs-dev
mailing list