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

DefaultActionMapperTest failures due to invalid mock type for parameterMap

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.24
    • 6.1.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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dmcgahon Dermot McGahon

            Dates

              Created:
              Updated:

              Slack

                Issue deployment