Skip to content
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

Add DeserializationFeature.FAIL_ON_MISSING_PRIMITIVE_PROPERTIES #1482

Closed
DVMaslov opened this issue Dec 23, 2016 · 2 comments
Closed

Add DeserializationFeature.FAIL_ON_MISSING_PRIMITIVE_PROPERTIES #1482

DVMaslov opened this issue Dec 23, 2016 · 2 comments
Labels
need-test-case To work on issue, a reproduction (ideally unit test) needed

Comments

@DVMaslov
Copy link

DVMaslov commented Dec 23, 2016

Consider pojo:

class Entity {
    @Getter
    private long id;
}

Already exists DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES. It prevent situation when json contains same {"id":null}, but if "id" property just missing, in field silent set default value - 0.

It seems logical add DeserializationFeature.FAIL_ON_MISSING_PRIMITIVE_PROPERTIES.

@GeorgiPetkov
Copy link

This issue is quite old and at least with the latest version 2.12.0 this is working as requested by the reporter (and I guess can be closed now).

I saw this issue while looking for duplicates of the following bug: #2977

@cowtowncoder
Copy link
Member

Thank you @GeorgiPetkov -- not sure how I missed this one when cleaning up old issues.

@cowtowncoder cowtowncoder added the need-test-case To work on issue, a reproduction (ideally unit test) needed label Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-test-case To work on issue, a reproduction (ideally unit test) needed
Projects
None yet
Development

No branches or pull requests

3 participants