From: Roland Häder Date: Thu, 20 Oct 2022 16:36:35 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a5aab74b5b0f23ca5a14f1d0b96ec4bcd88aa3ac;p=jcountry-core.git Continued: - used SafeNumberUtils.compare() method --- diff --git a/src/org/mxchange/jcountry/model/data/CountryData.java b/src/org/mxchange/jcountry/model/data/CountryData.java index c0dbebe..8dce48e 100644 --- a/src/org/mxchange/jcountry/model/data/CountryData.java +++ b/src/org/mxchange/jcountry/model/data/CountryData.java @@ -33,6 +33,7 @@ import javax.persistence.TemporalType; import javax.persistence.Transient; import org.apache.commons.lang3.StringUtils; import org.mxchange.jcoreutils.comparable.ComparableUtils; +import org.mxchange.jcoreutils.number.SafeNumberUtils; /** * A POJO for country data @@ -207,7 +208,7 @@ public class CountryData implements Country { // First check country code, clear indication ... StringUtils.compare(this.getCountryCode(), country.getCountryCode()), // ... and phone code, too - this.getCountryPhoneCode().compareTo(country.getCountryPhoneCode()), + SafeNumberUtils.compare(this.getCountryPhoneCode(), country.getCountryPhoneCode()), // ... then i18n key StringUtils.compare(this.getCountryI18nKey(), country.getCountryI18nKey()), // ... abroad dial prefix