You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in the issues and found nothing similar.
Describe the bug
A bean property with an inaccessible (private) field and an implicit constructor returns true from BeanPropertyDefinition#couldDeserialize in 2.16.1, and false in 2.17.1. Yet both versions deserialize the bean and the field just fine. So the meta model and the deserializer behavior are inconsistent.
This is a regression of sorts, but perhaps intentional? Specifically, this line has been added in 2.17 (despite the comment claiming "since 2.16") to address #736.
I'd expect bean deserialization to fail if BeanPropertyDefinition#couldDeserialize == false for one of the implicated fields.
Or, alternatively, BeanPropertyDefinition#couldDeserialize to return true if a usable bound constructor parameter is found.
Additional context
I am using Jackson's meta model to introspect Java types and create equivalent GraphQL types. For types used as inputs, it is important to know what fields are deserializable, as non-deserializable fields should not be mapped to GraphQL. For this reason, I have an extensive suite of tests for all sorts of Java types and deserialization configurations, and one of the tests caught this change in Jackson 2.17.
The text was updated successfully, but these errors were encountered:
Search before asking
Describe the bug
A bean property with an inaccessible (private) field and an implicit constructor returns
true
fromBeanPropertyDefinition#couldDeserialize
in 2.16.1, andfalse
in 2.17.1. Yet both versions deserialize the bean and the field just fine. So the meta model and the deserializer behavior are inconsistent.This is a regression of sorts, but perhaps intentional? Specifically, this line has been added in 2.17 (despite the comment claiming "since 2.16") to address #736.
Version Information
2.17.1
Reproduction
Expected behavior
I'd expect bean deserialization to fail if
BeanPropertyDefinition#couldDeserialize == false
for one of the implicated fields.Or, alternatively,
BeanPropertyDefinition#couldDeserialize
to returntrue
if a usable bound constructor parameter is found.Additional context
I am using Jackson's meta model to introspect Java types and create equivalent GraphQL types. For types used as inputs, it is important to know what fields are deserializable, as non-deserializable fields should not be mapped to GraphQL. For this reason, I have an extensive suite of tests for all sorts of Java types and deserialization configurations, and one of the tests caught this change in Jackson 2.17.
The text was updated successfully, but these errors were encountered: