Merge pull request #3921 from HirotoTanaka114/master

Re-ordering Stream APIs
This commit is contained in:
sqrrm 2020-01-31 10:20:58 +01:00 committed by GitHub
commit cad09aabfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,8 +78,8 @@ public class CurrencyUtil {
private static Map<String, FiatCurrency> createFiatCurrencyMap() {
return CountryUtil.getAllCountries().stream()
.map(country -> getCurrencyByCountryCode(country.code))
.distinct()
.sorted(TradeCurrency::compareTo)
.distinct()
.collect(Collectors.toMap(TradeCurrency::getCode, Function.identity(), (x, y) -> x, LinkedHashMap::new));
}