Skip to content

HttpMessageConverter should accept Class<? extends T> on can read [SPR-6771] #11437

@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-6771 and commented

There's a small glitch similar to #11408 inside HttpMessageConverter. If you use it programatically you usually ask canRead(Class<? extends T> clazz, MediaType mediatype) before invoking read(Class<T> clazz, HttpInputMessage message). If you now have an implementation fixing generics to Object to be as general as possible you can call canRead with a Foo.class but then in turn not read with Foo.class as it is not compatible to Class<Object>.


Issue Links:

Referenced from: commits f2fdf9f

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