From e99e4b28e4bc3481aab4f80ed0943535144af4c7 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Fri, 21 Mar 2014 21:31:51 +0100 Subject: [PATCH] Allows pass Locale as array of parameters --- .../com/opensymphony/xwork2/interceptor/I18nInterceptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java index 2ce91adbb..3deb268d1 100644 --- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java +++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java @@ -272,7 +272,7 @@ public class I18nInterceptor extends AbstractInterceptor { protected Object findLocaleParameter(Map params, String parameterName) { Object requestedLocale = params.remove(parameterName); if (requestedLocale != null && requestedLocale.getClass().isArray() - && ((Object[]) requestedLocale).length == 1) { + && ((Object[]) requestedLocale).length > 0) { requestedLocale = ((Object[]) requestedLocale)[0]; if (LOG.isDebugEnabled()) {