Skip to content

Fix #6374: skip structured extra values in array-shaped builders - #6391

Merged
cowtowncoder merged 6 commits into
3.xfrom
fix/array-builder-extra-values-6374
Nov 3, 2026
Merged

cowtowncoder merged 6 commits into
3.xfrom
fix/array-builder-extra-values-6374

Conversation

@cowtowncoder

@cowtowncoder cowtowncoder commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Fixes #6374 on the Jackson 3.x line (targeting 3.x only) based on #6377 by @wozhenbang2004.

Which contains the same fix and tests and whose commits and authorship are kept here. This PR adds the release-notes/VERSION and release-notes/CREDITS entries, which could not be pushed to the original PR because maintainer edits are not enabled on its fork.

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.

This patch does not include the separate 2.x backport.

🤖 Generated with Claude Code

@cowtowncoder cowtowncoder added cla-received PR already covered by CLA (optional label) 3.1 labels Nov 3, 2026
@cowtowncoder cowtowncoder added this to the 3.1.9 milestone Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 81.79% 📈 +0.000%
Branches branches 75.47% 📈 +0.020%

Coverage data generated from JaCoCo test results

@cowtowncoder
cowtowncoder changed the base branch from 3.1 to 3.x November 3, 2026 03:38
@cowtowncoder

Copy link
Copy Markdown
Member Author

Will re-target to 3.x.

@cowtowncoder cowtowncoder removed the 3.1 label Nov 3, 2026
Move #6374 release notes to 3.3.0, as the fix only goes in 3.x, and
cover the vanilla processing path in BuilderArrayExtraValues6374Test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cowtowncoder cowtowncoder added 3.3 and removed cla-received PR already covered by CLA (optional label) labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 83.07% 📈 +0.010%
Branches branches 77.27% 📈 +0.050%

Coverage data generated from JaCoCo test results

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 83.07% 📈 +0.010%
Branches branches 77.23% 📈 +0.010%

Coverage data generated from JaCoCo test results

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gitar-bot

gitar-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Changing array-builder deserialization to skip the current extra value before advancing could misalign parsing of following values if handling is wrong.

Fixes array-shaped builder deserialization in Jackson 3.x by skipping the current extra value before advancing, so structured extra values no longer have their closing array token mistaken for the end of the builder array. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

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

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 83.07% 📈 +0.010%
Branches branches 77.27% 📈 +0.050%

Coverage data generated from JaCoCo test results

@cowtowncoder
cowtowncoder merged commit 1e7cd63 into 3.x Nov 3, 2026
7 checks passed
@cowtowncoder
cowtowncoder deleted the fix/array-builder-extra-values-6374 branch November 3, 2026 04:18
@cowtowncoder cowtowncoder modified the milestones: 3.1.9, 3.3.0 Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@JsonFormat(shape = ARRAY) Builder: structured first extra array element not skipped correctly, leaves parser misaligned

2 participants