[ http://issues.apache.org/jira/browse/BEANUTILS-72?page=all ]
Niall Pemberton updated BEANUTILS-72:
-------------------------------------
Bugzilla Id: (was: 38654)
Component/s: ConvertUtils & Converters
> [beanutils] Problem with setting properties which are strings array.
> ---------------------------------------------------------------------
>
> Key: BEANUTILS-72
> URL: http://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
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]