Skip to content

FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY setting ignored when creator properties are buffered #2404

Closed
@josephlbarnett

Description

@josephlbarnett

#1341 added the ability to disable a FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY deserialization feature. However, it appears to only be observed through the complete(JsonParser p, DeserializationContext ctxt, Object bean) codepath, and is not examined in the complete(JsonParser p, DeserializationContext ctxt, PropertyValueBuffer buffer, PropertyBasedCreator creator) variant that gets used with, for example, @JsonCreator annoations.

It looks like adding the same check for prop.isRequired() || ctxt.isEnabled(DeserializationFeature.FAIL_ON_EXTERNAL_TYPE_ID_MISSING_PROPERTY)) immediately before calling ctxt.reportInputMismatch should allow the feature to work properly in this case?

Tested on jackson-databind 2.9.9

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