You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tomas Viberg <to...@viberg.nu> on 2002/06/15 19:26:05 UTC

[PATCH][BeanUtils] Bug #9746 - BeanUtils.populate throws an exception if indexed property and string array parameter

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 <to...@viberg.nu>