Skip to content

Conversation

@Khyojae
Copy link

@Khyojae Khyojae commented Jan 25, 2026

Description

This PR fixes an issue where CoreJacksonModule (Jackson 3 version) forcibly enables DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS, overriding any user-defined configuration.

Related Issue

Fixes #18561

Changes

  • Removed enable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS) from CoreJacksonModule#setupModule.
  • Added a regression test readDatesAsTimestampsIsDisabledThenSerializeAsIsoString in SecurityJacksonModulesTests.

Verification Results

Executed the added regression test and confirmed it passes after the fix (it fails without the fix).

This prevents NPE when GrantedAuthority.getAuthority() returns null. Closes spring-projectsgh-18543

Signed-off-by: Khyojae <khjae201@gmail.com>
Removed the forced enable of DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS in CoreJacksonModule to prevent overriding user-defined Jackson settings. Added a regression test case in SecurityJacksonModulesTests to verify that dates are serialized as ISO strings when the feature is disabled.

Signed-off-by: Khyojae <khjae201@gmail.com>
Signed-off-by: Khyojae <khjae201@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CoreJacksonModule forces WRITE_DATES_AS_TIMESTAMPS=true, overriding user configuration

2 participants