Skip to content

Fix #389: reject the wrong embedded type for ZoneId, Period, and ZoneOffset - #392

Closed
adityabagla7 wants to merge 2 commits into
FasterXML:2.xfrom
adityabagla7:fix-389-embedded-jsr310
Closed

adityabagla7 wants to merge 2 commits into
FasterXML:2.xfrom
adityabagla7:fix-389-embedded-jsr310

Conversation

@adityabagla7

@adityabagla7 adityabagla7 commented Sep 26, 2026 •

Copy link
Copy Markdown

A binary value was being stored as a ZoneId, Period, or ZoneOffset when it came in as an embedded object. A map of those types would then hold a byte array and not fail.

The deserializer now accepts an embedded value only when it is null or already the right type. Anything else fails with a mapping error. A real embedded ZoneId still works.

Tests are in JSR310EmbeddedObjectDeserTest. They passed locally.

Made with Cursor

Fixes #389

adityabagla7 and others added 2 commits September 26, 2026 23:52
… and ZoneOffset.

A byte array was being stored as those values. Only a matching type is accepted now.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cowtowncoder

Copy link
Copy Markdown
Member

Ah. Looks like there is already #391; since it was submitted earlier, I think I will take that, closing this one.

Thank you @adityabagla7 !

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.

Validate embedded objects for ZoneId, Periodand ZoneOffset

2 participants