Skip to content

Failure to deserialize polymorphic subtypes of base type Enum #2605

@tbloecker

Description

@tbloecker

Hi Jackson-Team,
I have posted this first at the Google Jackson-User Group:
https://groups.google.com/forum/#!topic/jackson-user/NjrFaUzTaRA

We have Problems with our application after updating Jackson to 2.10.*
With 2.10 we get "Cannot deserialize Class java.lang.Enum (of type enum) as a Bean" erros but with 2.9.10 everything is fine.
The Problem is about a genereic class where we have to ensure that the generic-parameter is an enum. We don't have full controll about the created subtypes, so we can not use TypeReferences for de-/serialisation as mentioned at the User-Group Post.

I have created a simple Test that reproduce the Problem:
jsontest.zip
Changing the Jackson-Version in the POM to 2.9.10 makes the tests green.

Kind regards
Tim

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