in locales-common/src/main/java/com/spotify/i18n/locales/common/model/SupportedLocale.java [101:109]
public static SupportedLocale fromLocale(final Locale locale) {
Preconditions.checkNotNull(locale, "Given input cannot be null");
ULocale uLocale = ULocale.forLocale(locale);
Preconditions.checkState(
Objects.nonNull(uLocale) && ALL_AVAILABLE_LOCALES.contains(uLocale),
"Given parameter locale could not be matched with a locale available in CLDR: %s",
locale);
return fromValidatedULocale(uLocale);
}