Skip to content

Polymorphic subtype deduction ignores defaultImpl attribute #3055

@drekbour

Description

@drekbour

Describe the bug
A class with @JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION, defaultImpl = Animal.class) that fails to deduce a solo candidate should use defaultImpl

Version information
2.12.0

To Reproduce
TBA see #2976

Expected behavior
In the absence of a single candidate, defaultImpl should be the target type regardless of suitability.

Additional context
The current deduction process does not support pojo-hierarchies such that the absence of child properties infers a parent type. That is, every deducible subtype MUST have some unique properties and the input data MUST contain said unique properties to provide a positive match.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions