Skip to content

Forbid null HttpMessageConverter in RestTemplate and HttpMessageConverterExtractor #23151

@sbrannen

Description

@sbrannen

This issue supersedes #23123 and #23140 with the intention of forbidding null HttpMessageConverter references supplied directly to RestTemplate and HttpMessageConverterExtractor.

Note, however, that we will not seek to prevent users from inserting null values into the list returned by RestTemplate#getMessageConverters(). If a user modifies the list returned by getMessageConverters() so that it contains null values, that will still lead to a NullPointerException when the converters are accessed.

See #23140 (comment) for further details.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions