-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Missing properties from base class when recursive types are involved. #1647
Comments
The reason the The reason
On line 1 constructType performs a recursive traversal like this:
The second time
However if only line 2 is called without line 1, then the following would have been returned
|
Excellent detective work! |
Fix #1647: Missing properties from base class when recursive types are involved
Spent the better part of today debugging odd JsonSerializer caches. Drilled down to this issue after rage-binary-chop-upgrading jackson until unit tests were green. +1000 For this! Thanks! |
When a type hierarchy as follows is constructed and the base class' type is constructed first by the TypeFactory then serializing the sub class fails due to missing properties from the base class.
Serializes sub as
{"sub":2}
where{"base":1,"sub":2}
is expected.I've created a minimal scenario of this bug here: https://github.com/slobo-showbie/jackson-recursive-type-bug
I've experienced this bug in 2.7.8, 2.8.8, and 2.8.8.1
The text was updated successfully, but these errors were encountered: