-
-
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
Make FAIL_ON_NULL_FOR_PRIMITIVES apply to primitive arrays and other types that wrap primitives #403
Comments
I've got another case that I believe should be covered by this issue (the above testcase doesn't seem to include it):
Should I file a separate bug report for this? |
@cowwoc Yes, please file a separate bug, can reference this one as related. |
Done: #446 |
One comment here; I do not think this feature should fail for Anyway; I consider this to only apply for |
Any update on the primitive array bug? Or can anyone suggest a workaround to force it to fail? |
@shmosel I try to update issues with notes when there is progress so no updates. But as luck would have it I did work in related area for |
Implemented for 2.9.0(.pr2), added tests: should cover both coercion from literal |
DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES
only seems to work on primitive properties on beans. It doesn't seem to work on reading straight values (I don't care that much about this), and reading primitive arrays.In addition, it would be good if this functionality, or a new DeserializationFeature was added to support failing on nulls in Lists that store wrap primitive types since people often use List as a property type instead of int[] for convenience.
Here is a test case I wrote to demonstrate this:
The text was updated successfully, but these errors were encountered: