[ https://issues.apache.org/jira/browse/BEANUTILS-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497373 ]
ivan matmati commented on BEANUTILS-72: --------------------------------------- I will see how you correct this issue with a better Converter implementation.Notice that this code solved my problem and seems very logical.Why give the first element of an array and not the array itself to the Converter ?I will try with your fix and will give you eventually feedback. Thanks. Ivan Matmati. -- Ivan matmati > [beanutils] Problem with setting properties which are strings array. > --------------------------------------------------------------------- > > Key: BEANUTILS-72 > URL: https://issues.apache.org/jira/browse/BEANUTILS-72 > Project: Commons BeanUtils > Issue Type: Bug > Components: ConvertUtils & Converters > Environment: Operating System: other > Platform: PC > Reporter: ivan matmati > Fix For: 1.8.0 > > > In my work, I had to deal with indexed properties with Struts.Some of them, > using multibox, should be string arrays. > But unfortunately, the setter I wrote was never called (It had a string array > as input parameter with the index as an other one).As I search the code, I > found what seemed a mistake in the code of BeanUtilsBean (version 1.7 of > commons bean utilities). > In line 1003, in setProperty method : > else if (value instanceof String[]) { > newValue = getConvertUtils().convert(((String[]) value)[0], > type); > I had to correct it to > else if (value instanceof String[]) { > newValue = getConvertUtils().convert(((String[]) value), > type); > In no way, I want a string as newValue but the array itself. > I hope it can help. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]