Introduce lenient parsing in DataSize regarding whitespace #28643
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
I've just helped a user correct a configuration mistake where they'd tried to configure a
DataSize
with a string of2KB
. This resulted in a conversion failure due to the trailing whitespace as neitherStringToDataSizeConverter
norDataSize.parse
trims the input. By contrast other areas of Framework such asCustomBooleanEditor
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?
The text was updated successfully, but these errors were encountered: