Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Egenolf committed Oct 27, 2023
1 parent 7b39a15 commit b6d132d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,14 @@ private String getCountryAsLowerCaseAlpha3(String country) {
if (country == null || country.length() != 2 && country.length() != 3) {
return null;
} else if (country.length() == 3) {
return country;
return country.toLowerCase();
}

return configProperties.getCountryCodeMap().getVirtualCountries()
.compute(country, (alpha2, alpha3) -> {
if (alpha3 != null) return alpha3.toLowerCase();
if (alpha3 != null) {
return alpha3.toLowerCase();
}

try {
return new Locale("en", alpha2).getISO3Country().toLowerCase();
Expand Down

0 comments on commit b6d132d

Please sign in to comment.