Open
Description
private static Map<String, String> loadCountryToCcy() {
Map<String, String> countryToCcy = new TreeMap<>();
Stream.of(Locale.getISOCountries()).forEach(countryCode -> {
// BEWARE we may prefer ISO3. Through, we're consistent here with LocaleHelpers
if (!Strings.isNullOrEmpty(countryCode)) {
Currency ccy = Currency.getInstance(Locale.of("fr", countryCode));
if (ccy != null) {
String currencyCode = ccy.getCurrencyCode();
countryToCcy.put(countryCode, currencyCode);
}
}
});
return ImmutableMap.copyOf(countryToCcy);
}
leads to improper code like .filter(countryCode -> !Strings.isNullOrEmpty(countryCode)).filter(countryCode -> !Strings.isNullOrEmpty(countryCode)).
Metadata
Assignees
Labels
No labels