Skip to content

Optional parameter in web method now raises error, breaks compatibility with the past [SPR-10584] #15213

Closed
@spring-projects-issues

Description

@spring-projects-issues

Alex opened SPR-10584 and commented

A sample method defined as follows:

@RequestMapping(value = "/test")
public String testMethod(Integer n) {
if (n == null)
// do something
else
// do something else
}

stopped working in Spring 3.2.3 (works fine up to 3.2.2) because calling the url like:
http://hostname/context/test?n=
raises a MissingServletRequestParameterException while it should not (it should put a null in n) breaking completely the compatibility with existing apps.


Affects: 3.2.3

Issue Links:

0 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions