Skip to content

Fix #389: validate embedded JSR-310 values - #391

Open
lux-liang wants to merge 3 commits into
FasterXML:2.xfrom
lux-liang:fix/389-validate-embedded-objects
Open

lux-liang wants to merge 3 commits into
FasterXML:2.xfrom
lux-liang:fix/389-validate-embedded-objects

Conversation

@lux-liang

Copy link
Copy Markdown

Fixes #389.

Summary

  • validate VALUE_EMBEDDED_OBJECT values against the requested JSR-310 type
  • continue accepting compatible embedded instances and embedded null
  • add shared regression coverage for Period, ZoneId, and ZoneOffset in a generic map

The regression test uses a TokenBuffer to exercise the same embedded-object token path as binary formats without adding a new test dependency.

Verification

  • ./mvnw -q -pl datetime -Dtest=JSR310StringParsableDeserializerTest,ZoneIdDeserTest,PeriodDeserTest,ZoneOffsetDeserTest test
  • ./mvnw -q test on JDK 25
  • ./mvnw -q test on JDK 17

@cowtowncoder

Copy link
Copy Markdown
Member

Thank you for contributing this!

One thing before I can merge this; CLA (if one not already sent), is needed, see:

https://github.com/FasterXML/jackson/blob/main/CONTRIBUTING.md#paperwork

Looking forward to merging this pr!

This branch has not been deployed

No deployments
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, Period and ZoneOffset

2 participants