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

IonParser.getNumberType() returns null for IonType.FLOAT #142

Merged
merged 1 commit into from Sep 5, 2018

Conversation

mmilkin
Copy link

@mmilkin mmilkin commented Aug 2, 2018

ObjectDeserialization fails with a NPE when a float exists in the ion structure.

There may be other problems when getNumberType() returns null since TokenBuffer.copyCurrentEvent does not expect nulls.

https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/util/TokenBuffer.java#L1054-L1062

@cowtowncoder
Copy link
Member

Thank you for reporting this problem and contributing a fix. Sounds like this is a flaw indeed.
I am on vacation now but will be back in 2 weeks and will look at contribution then.

For merging we will need a filled CLA from https://github.com/FasterXML/jackson filled, signed, scanned and sent to info at fasterxml dot com.

@mmilkin
Copy link
Author

mmilkin commented Aug 2, 2018

Thanks for the quick response, I will see what I can do about the license.

I also am not sure that this is the correct fix, there is something to be said for having a intelligent default for that switch other then null, either a DECIMAL or DOUBLE.

@hyandell
Copy link

hyandell commented Aug 2, 2018

This is an Amazon owned contribution. I've approved/given permission.

Amazon has signed the CLA and I'm listed on the CLA :)

@mmilkin
Copy link
Author

mmilkin commented Aug 9, 2018

I realize we like precision, changing return type to DOUBLE.

@mmilkin
Copy link
Author

mmilkin commented Sep 5, 2018

Any update on this?

@cowtowncoder
Copy link
Member

@hyandell thanks! @mmilkin Thanks for the ping, I was on vacation and missed approval note.

@cowtowncoder cowtowncoder merged commit 4fea433 into FasterXML:master Sep 5, 2018
@cowtowncoder cowtowncoder added this to the 2.9.7 milestone Sep 5, 2018
@cowtowncoder cowtowncoder changed the title TokenBuffer.copyCurrentEvent does not expect getNumberType return null. IonParser.getNumberType() returns null for IonType.FLOAT Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants