Skip to content

Commit

Permalink
fix review: Locale nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniiMunin committed Jan 7, 2025
1 parent 1c253db commit 3aaeb7a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ private List<ThrottlingMessage> extractMessagesForImp(
private static String getCountryNameFromAlpha2(String isoCode) {
return Optional.ofNullable(isoCode)
.filter(code -> !code.isBlank())
.map(code -> new Locale("", code))
.map(code -> new Locale(StringUtils.EMPTY, code))
.map(Locale::getDisplayCountry)
.orElse("");
.orElse(StringUtils.EMPTY);
}

private String getCountry(String ip) {
Expand Down

0 comments on commit 3aaeb7a

Please sign in to comment.