Skip to content

Null passed in required @RequestParam now fails #26088

Closed
@bostandyksoft

Description

@bostandyksoft

Since 5.3.1 version null, passed for required nullable parameter throws Exception "is not present"

@RequestMapping("/findTree")
public void findTree(@RequestParam("parentId") Long parentId) {
  if (parentId == null) {
    //Root
  } else {
    //Is not root
  }
}

now, i send request "/myurl/findTree?parentId="

Expected behavior - parameter parentId passed to method as null
Current behavior - exception within AbstractNamedValueMethodArgumentResolver

Metadata

Metadata

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions