Skip to content

Fix builder forward references resolved within typed arrays - #6226

Open
jakezwang wants to merge 1 commit into
FasterXML:3.2from
jakezwang:fix/builder-array-forward-reference
Open

jakezwang wants to merge 1 commit into
FasterXML:3.2from
jakezwang:fix/builder-array-forward-reference

Conversation

@jakezwang

Copy link
Copy Markdown

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 ArrayStoreException before 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.

@gitar-bot

gitar-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk

Fixes forward Object Id references resolved within typed arrays by updating the accumulator when builder-to-value rebinding occurs before array allocation. Regression tests added for single and repeated forward references, both of which would fail with ArrayStoreException before this fix. No issues found.

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 81.86% 📈 +0.010%
Branches branches 75.51% 📈 +0.030%

Coverage data generated from JaCoCo test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant