/** * passes through to getLocaleConstant. If this returns null, then this method passes through to * createLocale. * * @param localeString the locale string * @return the parsed locale */ public static Locale getLocale(String localeString) { Locale locale = getLocaleConstant(localeString); if (locale != null) { return locale; } return createLocale(localeString); } }
@Override public void setAsText(String text) { if (text == null) { setValue(Locale.getDefault()); } else if (text.length() == 0) { setValue(Locale.getDefault()); } else { setValue(LocaleUtil.getLocale(text)); } }