Skip to content

Introduce lenient parsing in DataSize regarding whitespace #28643

@wilkinsona

Description

@wilkinsona

I've just helped a user correct a configuration mistake where they'd tried to configure a DataSize with a string of 2KB . This resulted in a conversion failure due to the trailing whitespace as neither StringToDataSizeConverter nor DataSize.parse trims the input. By contrast other areas of Framework such as CustomBooleanEditor do trim before attempting conversion.

Could the various property editors and converters be updated to consistently trim whitespace when it's irrelevant to the target type?

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions