Conversation
| } | ||
|
|
||
| @Test | ||
| public void forwardReferenceResolvedWithinTypedArrayWithBuilder() throws Exception |
There was a problem hiding this comment.
When adding to pre existing test class, we courage tests to contain some information about original GitHub issue.
|
@jakezwang thank u for ur contribution! |
|
Need CLA unless already sent, see: https://github.com/FasterXML/jackson/blob/main/CONTRIBUTING.md#paperwork |
Signed-off-by: Jake Wang <jake.wang@argonlabs.tech>
Code Review ✅ Approved🟡 Medium risk · Updates pre-allocation typed-array rebinding so resolved builder references populate final slots. Fixes builder forward references resolved within typed arrays by updating the accumulator when a later element resolves a forward Object Id reference, ensuring the final array receives the built value rather than the transient builder. Comprehensive regression tests added and validated across JDK 17 and 21. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Fixes #6225.
When a later element resolves a forward Object Id reference in the same typed array, the builder-to-value rebind occurs before the array is allocated. Update the accumulator in that case too, so the final array receives the built value rather than the transient builder.
Adds regressions for a single forward reference and repeated references to multiple ids, including a null element. Both new tests fail with
ArrayStoreExceptionbefore the fix.Validation: full Maven verify on JDK17 and21 (6,189 tests each, one skipped), plus the JDK17 Android API34 compatibility check. JDK25 and other operating systems were not run locally.