On 9/8/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > The problem is the indexed setter, it confuses the BeanUtils class, > > probably because it (in contrast to PropertyUtils) tries to convert > > the value to the type expected by the setter method. Since you know > > the target type already, you could use PropertyUtils instead. > > Could you explain how it "confuses" it? Is it maybe just a matter of not > having both setters (that doesn't seem right to me, but who knows?? I > don't!) In reality I won't always know the type of the array being set, > it's only in this specific test case that I do, hence the reason Niall > provided the code like this.
This may very well be a bug in beanutils (I havn't checked the bug list), but from what I can see in the source of beanutils, the PropertyUtilsBean invokes the direct setter method (without index) with a single string instead of an String[] array, hence the argument type mismatch. Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
