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

Optional<Long> and OptionalLong deserialization are not consistent when deserializing from String. #15

Closed
lrpg opened this issue Mar 3, 2017 · 2 comments

Comments

@lrpg
Copy link

lrpg commented Mar 3, 2017

Examplewith: { "someString" : "9223372036854775807" }
Optional<Long> successfully deserializes while LongDeserializer
OptionalLong does not.

It is due to the first deserializing with NumberDeserializers.LongDeserializer using _parseLong(p, ctxt)
while the latter is deserialized with OptionalLongDeserializer using jp.getLongValue.

@lrpg lrpg changed the title Optional<Long Optional<Long> deserialization and OptionalLong deserialization is not consistent Mar 3, 2017
@lrpg lrpg changed the title Optional<Long> deserialization and OptionalLong deserialization is not consistent Optional<Long> and OptionalLong deserialization are not consistent when deserializing from String. Mar 3, 2017
@cowtowncoder
Copy link
Member

Yes, I can see the problem here. Thank you for reporting this.

@cowtowncoder
Copy link
Member

Interestingly enough, only Long variant appears to fail with 2.8, not int or double. Would have expected more coercion fails.

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

No branches or pull requests

2 participants