From: Roland Häder Date: Thu, 6 Oct 2022 12:45:59 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ad73a3f65c4a4f5e595b37e578aa7548a36aa0c0;p=jcountry-core.git Continued: - countryExternalDialPrefix might also be NULL or empty string but is required --- diff --git a/src/org/mxchange/jcountry/model/data/CountryData.java b/src/org/mxchange/jcountry/model/data/CountryData.java index 8d2cb81..c15948d 100644 --- a/src/org/mxchange/jcountry/model/data/CountryData.java +++ b/src/org/mxchange/jcountry/model/data/CountryData.java @@ -159,6 +159,12 @@ public class CountryData implements Country { } else if (countryCode.isEmpty()) { // Throw IAE throw new IllegalArgumentException("countryCode is empty"); //NOI18N + } else if (null == countryExternalDialPrefix) { + // Throw NPE + throw new NullPointerException("countryExternalDialPrefix is null"); //NOI18N + } else if (countryExternalDialPrefix.isEmpty()) { + // Throw IAE + throw new IllegalArgumentException("countryExternalDialPrefix is empty"); //NOI18N } else if (null == countryI18nKey) { // Throw NPE throw new NullPointerException("countryI18nKey is null"); //NOI18N @@ -202,7 +208,7 @@ public class CountryData implements Country { StringUtils.compare(this.getCountryCode(), country.getCountryCode()), // ... and phone code, too this.getCountryPhoneCode().compareTo(country.getCountryPhoneCode()), - // ... then last i18n key + // ... then i18n key StringUtils.compare(this.getCountryI18nKey(), country.getCountryI18nKey()), // ... abroad dial prefix StringUtils.compare(this.getCountryAbroadDialPrefix(), country.getCountryAbroadDialPrefix()),