Skip to content

fix(java): reject invalid calendar dates - #3523

Closed
schani wants to merge 8 commits into
fix/swift-lowercase-rfc3339from
fix/java-strict-calendar
Closed

fix(java): reject invalid calendar dates#3523
schani wants to merge 8 commits into
fix/swift-lowercase-rfc3339from
fix/java-strict-calendar

Conversation

@schani

@schani schani commented Sep 7, 2026

Copy link
Copy Markdown
Member

Jackson normalizes impossible calendar dates such as 2023-02-29 instead of rejecting them. Parse date-time values with a strict formatter so generated Java converters reject calendar rollovers.

The strict resolver is emitted only when the graph contains date-time values. A unit regression verifies its presence for date-time output, its absence otherwise, and preservation of a user type named ResolverStyle. Shared invalid-calendar fixture cases remain in #3521, after every affected backend supports them.

Production diff: 15 lines changed.

Validation:

  • new Java strict-calendar emission unit passes
  • focused date-time fixture passes
  • full Java/schema-Java fixtures: 145/145 pass
  • build and lint pass

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

638 files differ — 638 modified, 0 new, 0 deleted
5104 changed lines — +3190 / −1914

Open the generated-output report →

@schani

schani commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

This does't have tests!!!

@schani
schani force-pushed the fix/java-strict-calendar branch from 3c3d4d6 to 5e404d2 Compare September 8, 2026 01:04
@schani

schani commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Added a unit regression that checks strict calendar emission for date-time output, its absence from unrelated output, and preservation of a user type named ResolverStyle. The runtime calendar cases remain shared in #3521.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Generated-output differences

638 files differ — 638 modified, 0 new, 0 deleted
3896 changed lines — +1982 / −1914

Open the generated-output report →

Base automatically changed from fix/php-invalid-date-time to fix/swift-lowercase-rfc3339 September 8, 2026 02:45
@schani
schani force-pushed the fix/swift-lowercase-rfc3339 branch from c07cb7d to f362b87 Compare September 8, 2026 02:47
@schani
schani force-pushed the fix/java-strict-calendar branch from 5e404d2 to 02215b0 Compare September 8, 2026 02:47
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Generated-output differences

638 files differ — 638 modified, 0 new, 0 deleted
3896 changed lines — +1982 / −1914

Open the generated-output report →

@schani
schani force-pushed the fix/swift-lowercase-rfc3339 branch from f362b87 to 8dd8013 Compare September 8, 2026 03:05
@schani

schani commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Superseded by #3521, which combines the Java and Swift fixes with shared invalid-calendar cases 9 and 11.

@schani schani closed this Sep 8, 2026
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