You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Chris McFarland (JIRA)" <ji...@apache.org> on 2018/03/19 18:39:00 UTC

[jira] [Created] (BEANUTILS-508) BeanUtilsBean convertForCopy does not convert null values

Chris McFarland created BEANUTILS-508:
-----------------------------------------

             Summary: BeanUtilsBean convertForCopy does not convert null values
                 Key: BEANUTILS-508
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-508
             Project: Commons BeanUtils
          Issue Type: Bug
          Components: Bean / Property Utils
    Affects Versions: 1.9.3, 1.9.2, 1.9.1, 1.9.0
            Reporter: Chris McFarland


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|http://commons.apache.org/proper/commons-beanutils/javadocs/v1.9.3/apidocs/org/apache/commons/beanutils/converters/AbstractConverter.html]: 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."



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)