Open blacelle opened 3 weeks ago
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)).
.filter(countryCode -> !Strings.isNullOrEmpty(countryCode)).filter(countryCode -> !Strings.isNullOrEmpty(countryCode)).
leads to improper code like
.filter(countryCode -> !Strings.isNullOrEmpty(countryCode)).filter(countryCode -> !Strings.isNullOrEmpty(countryCode)).