From 754be7c7159ec5b2b4491395218cee89a71a6a61 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 3 Aug 2022 12:41:30 -0700 Subject: [PATCH] Update release notes wrt #3533 --- release-notes/VERSION-2.x | 2 ++ .../jackson/databind/deser/impl/ExternalTypeHandler.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 8d5a337907..2933ba28f1 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -51,6 +51,8 @@ Project: jackson-databind from parser nor use real defaults #3530: Change LRUMap to just evict one entry when maxEntries reached (contributed by @pjfanning) +#3533: Deserialize missing value of `EXTERNAL_PROPERTY` type using + custom `NullValueProvider` #3535: Replace `JsonNode.with()` with `JsonNode.withObject()` #3559: Support `null`-valued `Map` fields with "any setter" diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/impl/ExternalTypeHandler.java b/src/main/java/com/fasterxml/jackson/databind/deser/impl/ExternalTypeHandler.java index 8a6fbd5d92..326bd170f5 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/impl/ExternalTypeHandler.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/impl/ExternalTypeHandler.java @@ -297,7 +297,8 @@ public Object complete(JsonParser p, DeserializationContext ctxt, "Missing property '%s' for external type id '%s'", prop.getName(), _properties[i].getTypePropertyName()); } - + // 03-Aug-2022, tatu: [databind#3533] to handle absent value matching + // present type id values[i] = _deserializeMissingToken(p, ctxt, i, typeId); } @@ -358,6 +359,7 @@ protected final Object _deserialize(JsonParser p, DeserializationContext ctxt, return _properties[index].getProperty().deserialize(mp, ctxt); } + // 03-Aug-2022, tatu: [databind#3533] to handle absent value matching: @SuppressWarnings("resource") protected final Object _deserializeMissingToken(JsonParser p, DeserializationContext ctxt, int index, String typeId) throws IOException