Repository navigation
Fix skipping structured extra values in array-shaped builders - #6377
wozhenbang2004 wants to merge 2 commits into
Conversation
Code Review ✅ Approved🟡 Medium risk · Changing array-builder skip loops to consume extra values first affects parser positioning; an error could misalign nested values and later fields. Fixes array-shaped builder deserialization so structured extra values are skipped before advancing, preventing their closing array token from being mistaken for the end of the builder array. No issues found. VerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment 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 |
|
Re-created as #6391 for some re-work; will add credits for @wozhenbang2004 as fixer. |
Fixes #6374 on the Jackson 3.x line (targeting
3.1for forward merging).Both array-shaped builder deserialization paths are already positioned on the first extra value when they enter the skip loop. Advancing first can enter a structured extra value and mistake its closing array token for the end of the builder array. Skip the current value before advancing, matching the existing non-builder array deserializer.
Regression coverage exercises vanilla and active-view deserialization, root values with trailing-token checks, nested collection/object values, scalar and structured extras,
@JsonIgnoreProperties(ignoreUnknown = true), and strict-mode rejection controls.Validation on JDK 17: isolated fork red/green run.
3.1(baf2388): 6 regression errors, with 2 strict-mode controls passing../mvnw -B -ntp test '-Dtest=Builder*Test,POJOAsArrayTest', including all 8 new parameterized cases.The temporary validation workflow is not included in this PR. This patch does not include the separate 2.x backport.