-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implement forward reference resolution for ObjectArrayDeserializer #5415
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
Conversation
src/main/java/tools/jackson/databind/deser/jdk/ObjectArrayDeserializer.java
Outdated
Show resolved
Hide resolved
|
@RoiSoleil Wow. Looks great so far! One and only process thing, before I can merge this (with another code review or so), is that we need CLA (unless we already have one; I don't think we do but let me know if you have sent one before). https://github.com/FasterXML/jackson/blob/main/contributor-agreement.pdf and the usual way is to print the doc, fill & sign, scan/photo, email to "cla" at fasterxml dot com. Once we have it, CLA is good for all future contributions. Thank you once again for the very quick PR, including test. This seems like a good addition. |
This commit adds full forward-reference support to ObjectArrayDeserializer, mirroring the behavior already available for CollectionDeserializer. - Introduces ObjectArrayReferring and ObjectArrayReferringAccumulator - Catches UnresolvedForwardReference during element deserialization - Defers unresolved elements and resolves them once the target id is available - Ensures final array construction comes from the accumulator when used - Adds comprehensive unit tests validating forward reference handling Fixes: #5413
I’ve just sent the email with the signed PDF attached. Let me know if you need anything else. |
|
Refactored things a bit, merging now. Thank you again @RoiSoleil !!! |
|
Do you think this could be cherry-pick in 2.x branch ? |
|
@RoiSoleil I don't think so since since Java packages are different (files renamed 2.x -> 3.x), unfortunately. So would need to re-create into new PR from this one, semi-manually (can start with copy-pasting, but some class names differ; exceptions). I can help if you wanted to try that? |
|
This is done in : #5425 |
|
The other PR now merged. |
|
Thx ! |
This commit adds full forward-reference support to ObjectArrayDeserializer, mirroring the behavior already available for CollectionDeserializer.
Fixes: #5413