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

null Object Id serialized as anchor for YAML #63

Closed
jflefebvre06 opened this issue Dec 30, 2017 · 6 comments
Closed

null Object Id serialized as anchor for YAML #63

jflefebvre06 opened this issue Dec 30, 2017 · 6 comments
Labels
yaml Issue related to YAML format backend
Milestone

Comments

@jflefebvre06
Copy link

Bug detected into com.fasterxml.jackson.databind.ser.impl.WritableObjectId#writeAsField

gen.writeObjectId(String.valueOf(id));

shoud be if(id!=null)gen.writeObjectId(String.valueOf(id));

@cowtowncoder
Copy link
Member

Any chance you could write a test case to show the problem? I agree that fix sounds legit, but I am trying to figure out where does the null id come from. Why is caller not suppressing such a call?

@jflefebvre06
Copy link
Author

Yes of course, please find the belowed test.

Issue63Test.zip

@jflefebvre06
Copy link
Author

@cowtowncoder Hello, do you reproduce with my sample ?

@cowtowncoder
Copy link
Member

@jflefebvre06 Thank you for reminder! Unfortunately I haven't had time to look into this, but I now added it on Work-in-progress page:

https://github.com/FasterXML/jackson-future-ideas/wiki/Jackson-Work-in-Progress

to improve chances I'll get here soon. Apologies for delays.

@cowtowncoder cowtowncoder added this to the 2.9.9 milestone Feb 6, 2019
@cowtowncoder cowtowncoder changed the title YAML null ids serialized null Object Id serialized as anchor for YAML Feb 6, 2019
@cowtowncoder cowtowncoder added the yaml Issue related to YAML format backend label Feb 6, 2019
@jflefebvre06
Copy link
Author

Works fine thank you

@cowtowncoder
Copy link
Member

@jflefebvre06 thank you for verification.

pjankovsky pushed a commit to fivetran/jackson-dataformats-text that referenced this issue Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
yaml Issue related to YAML format backend
Projects
None yet
Development

No branches or pull requests

2 participants