You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Oleg V Alexeev <oa...@apache.org> on 2002/02/28 17:54:54 UTC
[BeanUtils] Convert logic.
Hello Jakarta,
BeanUtils now use such logic for "from String" conversion process as
1. Try to convert to the target type.
2. If all is ok then return conversion result
3. If error is encountered then return default value.
It is useful for simple solutions, but sometimes it needs to perform
validate/convert process at one moment. To achieve it we can use
such approach as -
1. Every single method for target type conversion throws
ConversionException with standart error description
in case of error in conversion process.
2. Batch conversion methods try to process every property, collect
all raised exception to the array and throw
BatchConversionException as container for all collected
exceptions.
So we can get all simple validate information at once ina case of
any errors or get conversion result with good values.
--
Best regards,
Oleg mailto:oalexeev@apache.org
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>