You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2014/08/01 10:26:39 UTC
[jira] [Updated] (WW-4288) staticParams interceptor overwrites
params conversion errors
[ https://issues.apache.org/jira/browse/WW-4288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-4288:
------------------------------
Description:
Have a stack like:
{code:xml}
...
<interceptor-ref name="params">
<interceptor-ref name="staticParams"/>
...
<interceptor-ref name="conversionError"/>
{code}
If have type conversion errors in params, they aren't seen by the conversionError interceptor.
It looks like this in StaticParametersInterceptor:
{code:java}
if (clearableStack && (stack.getContext() != null) && (newStack.getContext() != null))
stack.getContext().put(ActionContext.CONVERSION_ERRORS, newStack.getContext().get(ActionContext.CONVERSION_ERRORS));
{code}
ends up just overwriting the old value of ActionContext.CONVERSION_ERRORS rather than merging.
was:
Have a stack like:
...
<interceptor-ref name="params">
<interceptor-ref name="staticParams"/>
...
<interceptor-ref name="conversionError"/>
If have type conversion errors in params, they aren't seen by the conversionError interceptor.
It looks like this in StaticParametersInterceptor:
{code:java}
if (clearableStack && (stack.getContext() != null) && (newStack.getContext() != null))
stack.getContext().put(ActionContext.CONVERSION_ERRORS, newStack.getContext().get(ActionContext.CONVERSION_ERRORS));
{code}
ends up just overwriting the old value of ActionContext.CONVERSION_ERRORS rather than merging.
> staticParams interceptor overwrites params conversion errors
> ------------------------------------------------------------
>
> Key: WW-4288
> URL: https://issues.apache.org/jira/browse/WW-4288
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.3.15.3
> Reporter: Jasper Rosenberg
> Fix For: 2.3.18
>
>
> Have a stack like:
> {code:xml}
> ...
> <interceptor-ref name="params">
> <interceptor-ref name="staticParams"/>
> ...
> <interceptor-ref name="conversionError"/>
> {code}
> If have type conversion errors in params, they aren't seen by the conversionError interceptor.
> It looks like this in StaticParametersInterceptor:
> {code:java}
> if (clearableStack && (stack.getContext() != null) && (newStack.getContext() != null))
> stack.getContext().put(ActionContext.CONVERSION_ERRORS, newStack.getContext().get(ActionContext.CONVERSION_ERRORS));
> {code}
> ends up just overwriting the old value of ActionContext.CONVERSION_ERRORS rather than merging.
--
This message was sent by Atlassian JIRA
(v6.2#6252)