[ http://issues.apache.org/jira/browse/BEANUTILS-245?page=all ]
Simon Kitching closed BEANUTILS-245. ------------------------------------ Resolution: Invalid Closing as requested by original poster. > Problem setting nested index property or combined property (with index > property) > -------------------------------------------------------------------------------- > > Key: BEANUTILS-245 > URL: http://issues.apache.org/jira/browse/BEANUTILS-245 > Project: Commons BeanUtils > Issue Type: Bug > Affects Versions: 1.7.0 Release > Environment: Windows XP Professional, Java 5 > Reporter: Pawan Kumar Shrivastava > > This is the specific problem, when you are setting a nested index property > i.e. - > list1[0].value > Now i have initialized list1 as = new ArrayList(). Obviously the size is 0. > So PropertyUtils uses List.set(index, value) method, which throws > IndexOutOfBoundsException as the size and index are same. > I think it should check the index and size first and then decide whether to > call add(index, value) or set(index, value). > Please let me know, if my understanding is wrong. One potential misuse i can > see is what if someone passes index 100. But not sure if this can be resolved > by somehow shrinking the list. -- 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]