commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg V Alexeev <>
Subject [BeanUtils] Convert logic.
Date Thu, 28 Feb 2002 16:54:54 GMT
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

  So we can get all simple validate information at once ina case of
  any errors or get conversion result with good values.

Best regards,

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message