From a5aab74b5b0f23ca5a14f1d0b96ec4bcd88aa3ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 20 Oct 2022 18:36:35 +0200 Subject: [PATCH] Continued: - used SafeNumberUtils.compare() method --- src/org/mxchange/jcountry/model/data/CountryData.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5