WW-4722 Adds description of storage parameter
Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/09958919 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/09958919 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/09958919 Branch: refs/heads/master Commit: 09958919caabc66d3b963b81af6f8c3c4b44efe0 Parents: aabc90d Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Thu Dec 1 19:58:03 2016 +0100 Committer: Lukasz Lenart <lukaszlen...@apache.org> Committed: Thu Dec 1 19:58:03 2016 +0100 ---------------------------------------------------------------------- .../java/org/apache/struts2/interceptor/I18nInterceptor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/09958919/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java index 3fbe1f3..16ce51f 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java @@ -74,6 +74,9 @@ import java.util.Map; * <li>attributeName (optional) - the name of the session key to store the selected locale. By default this is * <b>WW_TRANS_I18N_LOCALE</b></li> * + * <li>storage (optional) - the name of storage location, it can be <b>none</b>, <b>session</b> or <b>cookie</b>. + * By default this is <b>session</b></li> + * * </ul> * * <!-- END SNIPPET: parameters --> @@ -130,7 +133,7 @@ public class I18nInterceptor extends AbstractInterceptor { this.storage = Storage.NONE; } else { try { - this.storage = Storage.valueOf(storageName); + this.storage = Storage.valueOf(storageName.toUpperCase()); } catch (IllegalArgumentException e) { LOG.warn(new ParameterizedMessage("Wrong storage name [{{}] was defined, falling back to {}", storageName, Storage.SESSION), e); this.storage = Storage.SESSION;