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

staticParams interceptor overwrites params conversion errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.15.3
    • 2.5.x
    • Core Interceptors
    • 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

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

            Dates

              Created:
              Updated: