commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomas Viberg" <to...@viberg.nu>
Subject [PATCH][BeanUtils] Bug #9746 - BeanUtils.populate throws an exception if indexed property and string array parameter
Date Sat, 15 Jun 2002 17:26:05 GMT
Hi all,

for some reason, when the setProperty method of BeanUtils is populating an indexed property
with a String array, only the first element of the input array is passed to ConvertUtils.
The array is thus converted to a single String, causing an IllegalArgumentException since
the setter method expects an array.

I enclose a patch for BeanUtils.java that makes sure the complete array is passed to ConvertUtils,
and patches for TestBean.java and BeanUtilsTestCase.java so that they also test setting and
getting indexed properties containing arrays.

Regards,
Tomas Viberg <tomas@viberg.nu>

Mime
View raw message