struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [1/3] git commit: Allows pass Locale as array of parameters
Date Sat, 22 Mar 2014 08:08:56 GMT
Repository: struts
Updated Branches:
  refs/heads/develop 4fbfa3b8b -> 49ecb5f9f


Allows pass Locale as array of parameters


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/e99e4b28
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/e99e4b28
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/e99e4b28

Branch: refs/heads/develop
Commit: e99e4b28e4bc3481aab4f80ed0943535144af4c7
Parents: 4fbfa3b
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Mar 21 21:31:51 2014 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Mar 21 21:31:51 2014 +0100

----------------------------------------------------------------------
 .../java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/e99e4b28/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
----------------------------------------------------------------------
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 2ce91ad..3deb268 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<String, Object> 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()) {


Mime
View raw message