Skip to content

Jackson2ObjectMapperFactoryBean.setAutoDetectGettersSetters(boolean) does not affect "is" getters [SPR-13073] #17665

@spring-projects-issues

Description

@spring-projects-issues

Eric Rizzo opened SPR-13073 and commented

The method Jackson2ObjectMapperFactoryBean.setAutoDetectGettersSetters(boolean) currently does not control auto detection of "is" getters. There is a separate MapperFeature for that, AUTO_DETECT_IS_GETTERS, which can be configured via Jackson2ObjectMapperFactoryBean.
Because there is no separate setter method on Jackson2ObjectMapperFactoryBean to control the AUTO_DETECT_IS_GETTERS feature, it's not possible to truly disable getter/setter auto detection via configuration through Jackson2ObjectMapperFactoryBean. It could be argued that the name of setAutoDetectGettersSetters(), in absence of any other getter-auto-detection config methods, is misleading.
Either another config method should be provided or the behavior of setAutoDetectGettersSetters() should be modified to include "is" getters."

Note that the underlying class Jackson2ObjectMapperBuilder probably needs to be updated to accomodate either of those two options, Jackson2ObjectMapperFactoryBean is just a thin wrapper around functionality provided by Jackson2ObjectMapperBuilder.


Referenced from: commits 48b512c

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