[
https://issues.apache.org/jira/browse/BEANUTILS-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Yandell updated BEANUTILS-339:
------------------------------------
Fix Version/s: (was: 1.8.0-BETA)
> BeanUtilsBean.setProperty throws IllegalArgumentException if value is null
> --------------------------------------------------------------------------
>
> Key: BEANUTILS-339
> URL: https://issues.apache.org/jira/browse/BEANUTILS-339
> Project: Commons BeanUtils
> Issue Type: Bug
> Components: Bean / Property Utils
> Affects Versions: 1.8.0-BETA
> Reporter: Alan Escreet
> Priority: Blocker
>
> Line 1003-1004 conflicts with API doc: "If null is passed into a property
> expecting a primitive value, then this will be converted as if it were a null
> string."
> Line 1003 only tests if the value is null and 1004 explicitly casts to a
> String. If a bean has a field of any other type, i.e. java.util.Comparator,
> then this fails with:
> {{java.lang.IllegalArgumentException: Cannot invoke <myBean>.setComparator on
> bean class 'class <myBean>' - argument type mismatch - had objects of type
> "java.lang.String" but expected signature "java.util.Comparator"}}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.