Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4288

staticParams interceptor overwrites params conversion errors

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.15.3
    • Fix Version/s: 2.5.x
    • Component/s: Core Interceptors
    • Labels:
      None

      Description

      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:

      if (clearableStack && (stack.getContext() != null) && (newStack.getContext() != null))
          stack.getContext().put(ActionContext.CONVERSION_ERRORS, newStack.getContext().get(ActionContext.CONVERSION_ERRORS));
      

      ends up just overwriting the old value of ActionContext.CONVERSION_ERRORS rather than merging.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              perfnorm Jasper Rosenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: