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

DefaultActionMapperTest failures due to invalid mock type for parameterMap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.24
    • 6.7.0
    • Unit Tests
    • None

    Description

      All of the tests which use StrutsMockHttpServletRequest are setting up incorrectly typed parameterMaps in the mock.

      A parameterMap should be typed java.util.Map<java.lang.String,java.lang.String[]> and not Map<String,String> as the tests are doing i.e the value parameter should be String[] and not String. This caused us to see test failures when treating those values as String[] when they weren't.

      See:

      http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html
      http://docs.oracle.com/javaee/7/api/javax/servlet/ServletRequest.html#getParameterMap%28%29

      Attachments

        Activity

          People

            Unassigned Unassigned
            dmcgahon Dermot McGahon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: