Merge pull request #5748 from jmacxx/fix_sepa_eu_countries_comparator

Fix logic of SEPA country comparison routine
This commit is contained in:
Christoph Atteneder 2021-10-12 10:04:46 +02:00 committed by GitHub
commit 596e819629
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,9 +84,8 @@ public class CountryUtil {
}
public static boolean containsAllSepaEuroCountries(List<String> countryCodesToCompare) {
countryCodesToCompare.sort(String::compareTo);
List<String> countryCodesBase = getAllSepaEuroCountries().stream().map(c -> c.code).collect(Collectors.toList());
return countryCodesToCompare.toString().equals(countryCodesBase.toString());
return countryCodesToCompare.containsAll(countryCodesBase) && countryCodesBase.containsAll(countryCodesToCompare);
}
public static boolean containsAllSepaInstantEuroCountries(List<String> countryCodesToCompare) {