Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.8.0-BETA
-
None
Description
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"
Attachments
Issue Links
- is duplicated by
-
BEANUTILS-331 BeanUtils.populate throws IllegalArgumentException when value is null.
- Closed