-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
has-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issueIndicates that there exists a test case (under `failing/`) to reproduce the issue
Milestone
Description
Search before asking
- I searched in the issues and found nothing similar.
Describe the bug
i have a class containing a field of an enum type. The data is fetched from an api that can add further possible enum values at any point. I want to guard my implementation by using the JsonEnumDefaultValue.
During the deserialization of an unknown value, instead of the annotated default, a different instance of this enum is returned.
Version Information
2.16
Reproduction
https://github.com/dominik-henning/jackson-databind-enum-deserialization-reproducer
i created a projected containing a test class which shows my usecase and setup.
Expected behavior
When an value is encountered which does not match to a annotated JsonProperty, i would expect that the JsonEnumDefaultValue is returned.
Additional context
The real world example is different, but the project boils the problem down to the bare minimum.
Metadata
Metadata
Assignees
Labels
has-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issueIndicates that there exists a test case (under `failing/`) to reproduce the issue