-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constructorDetector
seems to invalidate defaultSetterInfo
for nullability
#3241
Comments
Yes, I can reproduce this. Strange... It is possible this is due to implicit detection of constructors missing some information that would be discovered by explicitly marker ones. |
This is particularly annoying when using records as we need to do something like:
Do you think this fix can be included in 2.14? |
As soon as someone provides a fix, yes, it could probably be included in a 2.13.x patch as well. I haven't had and probably won't have time to work in this in near future. |
Sigh. Yes, I think this is because of the disprepancy between merging of annotations between explicitly annotated and implicitly located Creators: this is a long-standing general problem that manifests in many different ways. On plus side: if and when property introspection gets rewritten (it is #1 top Big Thing for me to fix) this problem will be resolved. |
|
Work on #4515 likely makes it possible to solve this for 2.18. |
constructorDetector
seems to invalidate defaultSetterInfo
for nullability
Fixed via #4515, to be included in 2.18.0. |
Was trying out the new constructor detector feature (https://cowtowncoder.medium.com/jackson-2-12-most-wanted-3-5-246624e2d3d0/) and stumbled upon the following issue.
I had this code which forbids nulls on deserialization:
and was trying to get rid of
@JsonCreator
with the followingAlthough I no longer need to annotate my class with
@JsonCreator
, my settings for nullability are ignored, which means I can't really use the new feature.(Might be related with #3227?)
The text was updated successfully, but these errors were encountered: