Skip to content

Contract of @RequestBody(required=true) not obeyed [SPR-11828] #16447

Closed

Description

@spring-projects-issues

Andrei Badea opened SPR-11828 and commented

When I send a HTTP request with an empty body, the respective controller method is invoked with a null argument for the parameter annotated with @RequestBody. Instead, a HttpMessageNotReadableException should be thrown.

This may be a regression introduced by the fix of #14575. Note that fix removed the statement that threw HttpMessageNotReadableException.


Affects: 3.2.8

Issue Links:

Referenced from: commits de1a41a

Activity

  1. added
    type: bug
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions