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

When strict treat empty string as invalid format for LocalDateDeserializer and LocalDateTimeDeserializer #136

Merged
merged 1 commit into from
Sep 15, 2019

Conversation

kupci
Copy link
Member

@kupci kupci commented Sep 9, 2019

If 'strict', treat empty string as invalid format, so that LocalDateDeserializer and LocalDateTimeDeserializer report this as an error instead of mapping to null. See issue #114

@kupci kupci marked this pull request as ready for review September 11, 2019 04:24
@cowtowncoder
Copy link
Member

Makes sense to me (even outside question of bigger changes), esp. with 2.10 essentially defaulting to "lenient" handling.

Do you think there are other data types here that should be similarly changed?

@cowtowncoder cowtowncoder added this to the 2.10.0 milestone Sep 15, 2019
@cowtowncoder cowtowncoder merged commit 48ba124 into FasterXML:master Sep 15, 2019
@cowtowncoder
Copy link
Member

I went ahead and merged this in master, backported in 2.10: I think that in short term, this makes sense. If we can come up with more general, consistent scheme for 3.0, that'd be nice, but for now I think this will work better than it used to.

@kupci
Copy link
Member Author

kupci commented Sep 16, 2019

Do you think there are other data types here that should be similarly changed?

Yes, it certainly looks so. The same "empty string" test case that was in this fix also exposes the issue in the rest of the deserializers, except for the ones that were part of this fix, and YearDeserializer.

I've added issue #138 for this.

@cowtowncoder
Copy link
Member

Ok cool. Now we have a template sort of, as well as current definition. I'll try to get as many PRs as possible merged for 2.10, and I think that they can be done as patches too since "lenient" is still the default for 2.10.

@kupci kupci deleted the fix-for-114 branch September 17, 2019 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants