mirror of
https://github.com/apache/struts.git
synced 2026-08-15 11:37:02 +00:00
Fixes a problem with missing locale if HttpServletRequest#getLocale throws exception
This commit is contained in:
@@ -758,7 +758,12 @@ public class Dispatcher {
|
||||
locale = request.getLocale();
|
||||
}
|
||||
} else {
|
||||
locale = request.getLocale();
|
||||
try {
|
||||
locale = request.getLocale();
|
||||
} catch (RuntimeException e) {
|
||||
LOG.warn("Cannot get locale from Http Request, falling back to system default locale", e);
|
||||
locale = Locale.getDefault();
|
||||
}
|
||||
}
|
||||
return locale;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user