Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.7.0
-
None
-
Linux/Java5
Description
BeanUtilsBean.setProperty(Object bean, String name, Object value) cannot properly convert any custom class using convertor.
Line 1007
It calls toString() on every object regardless of its type (unless it was a string or an array). This prevent custom convertors from functioning.
} else if (getConvertUtils().lookup(value.getClass()) != null)
{ newValue = getConvertUtils().convert(value.toString(), type); //<--- WRONG! }else
{ newValue = value; }}