Skip to content

MappingJackson2(Http)MessageConverter should be more verbose in canRead/canWrite checks (on Jackson 2.3) [SPR-11261] #15886

@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-11261 and commented

The MappingJackson2HttpMessageConverter currently calls objectMapper.can(De)Serialize(…) to check whether the mapper supports a given type. The mapper returns false if it encounters an exception in the marshaling metadata setup. So if you have an error in your mapping setup, the HMC is not selected and you never find out why.

ObjectMapper has overloads for the can(De)Serialize(…) methods taking an AtomicReference to capture the issue that prevented the serializer from being able to (de)serialize the type. So it would be cool if we used those and log the reason in the debug level.


Affects: 3.2.6, 4.0 GA

Issue Links:

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