When throwing ConversionException, provide more information: 
...beanutils.ConversionException: No value specified for 'Date'
----------------------------------------------------------------------------------------------------------------------------

                 Key: BEANUTILS-348
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-348
             Project: Commons BeanUtils
          Issue Type: Improvement
          Components: Bean / Property Utils
    Affects Versions: 1.8.0-BETA
            Reporter: Ralf Hauser


after migrating from 1.7 to v1.8, I get the following backward incompatibility:
org.apache.commons.beanutils.ConversionException: No value specified for 'Date'
        at 
org.apache.commons.beanutils.converters.AbstractConverter.handleMissing(AbstractConverter.java:310)
        at 
org.apache.commons.beanutils.converters.AbstractConverter.convert(AbstractConverter.java:136)
        at 
org.apache.commons.beanutils.converters.ConverterFacade.convert(ConverterFacade.java:60)
        at 
org.apache.commons.beanutils.BeanUtilsBean.convert(BeanUtilsBean.java:1074)
        at 
org.apache.commons.beanutils.BeanUtilsBean.copyProperty(BeanUtilsBean.java:437)
        at 
org.apache.commons.beanutils.BeanUtilsBean.copyProperties(BeanUtilsBean.java:286)
        at 
org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:137)

Suggestion:
1) say which getter caused the problem (there may be more than one Date field 
in the object)
2) in the getMessage, even suggest to use PropertyUtils.copyProperties() if 
null should be acceptable to

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to