Skip to content

Avoid redundant registration of legacy date converters#36953

Open
arnabnandy7 wants to merge 1 commit into
spring-projects:mainfrom
arnabnandy7:fix-issue-36951
Open

Avoid redundant registration of legacy date converters#36953
arnabnandy7 wants to merge 1 commit into
spring-projects:mainfrom
arnabnandy7:fix-issue-36951

Conversation

@arnabnandy7

Copy link
Copy Markdown

Prior to this commit, DateTimeFormatterRegistrar registered legacy date converters via DateTimeConverters.registerConverters, which in turn called DateFormatterRegistrar.addDateConverters.

Since DefaultFormattingConversionService registers both DateTimeFormatterRegistrar and DateFormatterRegistrar, this resulted in redundant double registration of legacy converters (such as DateToLongConverter, CalendarToDateConverter, etc.).

This commit removes the redundant call to addDateConverters from DateTimeConverters.registerConverters, ensuring legacy date converters are only registered by DateFormatterRegistrar.

Closes gh-36951

Prior to this commit, DateTimeFormatterRegistrar registered legacy
date converters via DateTimeConverters.registerConverters, which in
turn called DateFormatterRegistrar.addDateConverters.

Since DefaultFormattingConversionService registers both
DateTimeFormatterRegistrar and DateFormatterRegistrar, this resulted
in redundant double registration of legacy converters (such as
DateToLongConverter, CalendarToDateConverter, etc.).

This commit removes the redundant call to addDateConverters from
DateTimeConverters.registerConverters, ensuring legacy date converters
are only registered by DateFormatterRegistrar.

Closes spring-projectsgh-36951

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 20, 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 or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant registration of Date/Calendar/Long converters in DefaultFormattingConversionService

2 participants