DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16525>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16525 BeanUtils.setProperty is over-zealous at converting types ------- Additional Comments From [EMAIL PROTECTED] 2003-08-20 02:23 ------- I just ran into the same problem - my value is converted to a String unnecessarily by BeanUtils.setProperty(). Unfortunately, the calling code is not mine so I don't have an easy option of switching to copyProperty() instead. It seems to me, though, that there is a simple solution. The toString() conversion performed in this line from setProperty: newValue = getConvertUtils().convert(value.toString(), type); shouldn't be necessary. Although ConvertUtils.convert() wants a String value, it just passes it to a Converter that can take any Object as a value. Why not change ConvertUtils.convert() to accept an Object value and avoid having BeanUtils convert it to a String first? That way, converters will still get first crack at a conversion. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
