这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix null handling of EnumSetDeserializer #5203

@k163377

Description

@k163377

Search before asking

  • I searched in the issues and found nothing similar.

Describe the bug

The EnumSetDeserializer implementation has problems with calls to _nullProvider and handling of _skipNullValues that are not consistent.
This Issue was submitted based on the following comment
#5165 (comment)

Version Information

2.20.0

Reproduction

No response

Expected behavior

It is suggested that the flow should be modified as follows

flowchart TD
    A[Is JsonToken.VALUE_NULL?] -->|Yes| B[Is _skipNullValues true?]
    B -->|Yes| C[Skip]
    B -->|No| D[value = _nullProvider.getNullValue]

    A -->|No| E[value = _enumDeserializer.deserialize]
    E --> F{Is value null?}
    F -->|Yes| D
    F -->|No| M[Use value]

    D --> I{Is value null?}

    I -->|Yes| J[Is _skipNullValues true?]
    J -->|Yes| K[skip value]
    J -->|No| L[Throw error]

    I -->|No| M
Loading

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.21enumRelated to handling of Enum values

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions