Skip to content

Improve FactoryBasedEnumDeserializer to work better with XML module #4807

@cowtowncoder

Description

@cowtowncoder

Describe your Issue

(note: this is to help solve FasterXML/jackson-dataformat-xml#682)

It looks like FactoryBasedEnumDeserializer does not have same work-around as basic EnumDeserializer has for Object valued input:

(line 287)

        // 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML)
        if (p.isExpectedStartObjectToken()) {
            return _fromString(p, ctxt,
                    ctxt.extractScalarFromObject(p, this, _valueClass));
        }

But it should have, to support String-argument taking "DELEGATING" Creator.
Let's add handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.18Issues planned at 2.18 or later

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions