diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index e5c02316bf..1676f352dd 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -1302,3 +1302,7 @@ Miguel G (Migwel@github) * Reported, contributed fix for #3025: UntypedObjectDeserializer` mixes multiple unwrapped collections (related to #2733) (2.12.2) + +Jelle Voost (jellevoost@github) + * Reported #3038: Two cases of incorrect error reporting about DeserializationFeature + (2.12.2) diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 11e0005df4..3eac12d0d1 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -12,6 +12,8 @@ Project: jackson-databind #3025: UntypedObjectDeserializer` mixes multiple unwrapped collections (related to #2733) (fix contributed by Migwel@github) +#3038: Two cases of incorrect error reporting about DeserializationFeature + (reported by Jelle V) 2.12.1 (08-Jan-2021) diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/impl/PropertyValueBuffer.java b/src/main/java/com/fasterxml/jackson/databind/deser/impl/PropertyValueBuffer.java index 95fa25e622..67b20ba020 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/impl/PropertyValueBuffer.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/impl/PropertyValueBuffer.java @@ -133,7 +133,7 @@ public Object getParameter(SettableBeanProperty prop) } if (value == null && _context.isEnabled(DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES)) { return _context.reportInputMismatch(prop, - "Null value for creator property '%s' (index %d); `DeserializationFeature.FAIL_ON_NULL_FOR_CREATOR_PARAMETERS` enabled", + "Null value for creator property '%s' (index %d); `DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES` enabled", prop.getName(), prop.getCreatorIndex()); } return value; @@ -173,7 +173,7 @@ public Object[] getParameters(SettableBeanProperty[] props) if (_creatorParameters[ix] == null) { SettableBeanProperty prop = props[ix]; _context.reportInputMismatch(prop, - "Null value for creator property '%s' (index %d); `DeserializationFeature.FAIL_ON_NULL_FOR_CREATOR_PARAMETERS` enabled", + "Null value for creator property '%s' (index %d); `DeserializationFeature.FAIL_ON_NULL_CREATOR_PROPERTIES` enabled", prop.getName(), props[ix].getCreatorIndex()); } }