Fixed: UtilMisc.ensureLocale does not always return a valid Locale.
(OFBIZ-9964) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814319 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -547,7 +547,10 @@ public final class UtilMisc {
|
||||
*/
|
||||
public static Locale ensureLocale(Object localeObject) {
|
||||
if (localeObject instanceof String) {
|
||||
return parseLocale((String) localeObject);
|
||||
Locale locale = parseLocale((String) localeObject);
|
||||
if (locale != null) {
|
||||
return locale;
|
||||
}
|
||||
} else if (localeObject instanceof Locale) {
|
||||
return (Locale) localeObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user