Skip to content

ConversionServiceFactory.addDefaultConverters() should add symetric converters [SPR-8306] #12955

@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-8306 and commented

ConversionServiceFactory.addDefaultConverters() adds a few converters to convert from String to a particular type (e.g. Boolean, Character, Locale and so on). To convert those types back it adds an ObjectToStringConverter. This causes trouble as if you unregister this converter (in case you want to prevent any object to be convertible to a String without an explicit converter being added) you lose the ability to convert from and to those simple types as well.

I think we should have explicit converters for the simple types and use ObjectToStringConverter only as fallback for types that don't have explicit converters registered.


Affects: 3.0.5, 3.1 M1

Issue Links:

Referenced from: commits e25fbf2

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions