Skip to content

"Conflicting setter definitions for property" exception for Map subtype during deserializationΒ #2757

@fschmager

Description

@fschmager

I've been deserializing Spring's HttpHeaders without issue until I upgraded to latests Spring 2.3.0 which upgraded Jackson from 2.10.3 to 2.11.

After the upgrade to Jackson 2.11 I get this exception when trying to deserialize an HttpHeaders object:

com.fasterxml.jackson.databind.JsonMappingException: Conflicting setter definitions for property "date": org.springframework.http.HttpHeaders#setDate(1 params) vs org.springframework.http.HttpHeaders#setDate(1 params)

(same can happen for lastModified or any other overloaded setter)

There are 3 setDate methods on HttpHeaders.

It's throw as part of POJOPropertyBuilder#getSetter()

I've traced it back to this change in POJOPropertiesCollector as part of #2555

I couldn't find any way to disable indexing. #2555 is hinting that there isn't one:

It may become necessary to allow NOT doing this, too (via MapperFeature), but let's start by assumption that index should be used.

I'm wondering if the indexing change broke backward compatibility.

Version exhibiting behavior: 2.11
Last working version (that I tried): 2.10.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions