Skip to content

Handle ResponseEntity with null bodies [SPR-14663] #19227

@spring-projects-issues

Description

@spring-projects-issues

Brian Clozel opened SPR-14663 and commented

Controller methods like the following throw NullPointerExceptions because the ResponseEntityResultHandler is trying to serialize the response entity body even though it's null:

@RequestMapping("/test")
public Mono<ResponseEntity<Void>> test() {
	return Mono.just(ResponseEntity.notFound().build());
}

Affects: 5.0 M1

Reference URL: https://github.com/bclozel/spring-boot-web-reactive/issues/22

Referenced from: commits 01bd8b9

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions