Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-348

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0-BETA
    • 2.0.0
    • Bean / Property Utils
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hauser@acm.org Ralf Hauser
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: