Skip to content

MockHttpServletRequest must not throw an exception on getParameter(null) [SPR-10192] #14825

@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-10192 and commented

The JavaDoc of ServletRequest does not specify the parameter name to be a non-null value. So we have to deal with clients calling the method with a null value leniently and simply return null.

Servlet containers like Jetty are not as strict and thus one might stumble over this issue only when using e.g. Spring MVC testing framework.


Issue Links:

  • DATAREST-60 AbstractRepositoryRestController potentially calls HttpServletRequest.getParameter(…) with null

Referenced from: commits c1a4f5c, 01f3102

Backported to: 3.1.4

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions