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

BeanUtilsBean convertForCopy does not convert null values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.0, 1.9.1, 1.9.2, 1.9.3
    • None
    • Bean / Property Utils
    • None

    Description

      BeanUtilsBean convertForCopy(value, type) only calls convert(value, type) for non-null 'value'. This is incorrect because null value handling should be left up to the Converter implementation. As stated in AbstractConverter javadoc: the AbstractConverter(Object defaultValue) constructor sets the "default value to be returned if the value to be converted is missing or an error occurs converting the value."

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmac Chris McFarland
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified