]> git.mxchange.org Git - jcountry-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 20 Oct 2022 16:36:35 +0000 (18:36 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Oct 2022 16:36:35 +0000 (18:36 +0200)
- used SafeNumberUtils.compare() method

src/org/mxchange/jcountry/model/data/CountryData.java

index c0dbebe5cc56af986cc3cbcb8cee0c0d829f8834..8dce48e1645e745b76dea6e874ea40db20f63ff1 100644 (file)
@@ -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