Attached is the diff for the patch on PropertyUtils.java.
The code is tested and works great.
Or if that don't work (heaven forbid), replace lines 419 to 423
(inclusive) with the code below.
Object value = readMethod.invoke(bean, new Object[0]);
if (!value.getClass().isArray()) {
if (!(value instanceof java.util.List)) {
throw new IllegalArgumentException("Property '" + name
+ "' is not indexed");
} else {
return ((java.util.List)value).get(index);
}
}
return (Array.get(value, index));
419,428c419,423
< Object value = readMethod.invoke(bean, new Object[0]);
< if (!value.getClass().isArray()) {
< if (!(value instanceof java.util.List)) {
< throw new IllegalArgumentException("Property '" + name
< + "' is not indexed");
< } else {
< return ((java.util.List)value).get(index);
< }
< }
< return (Array.get(value, index));
---
> Object value = readMethod.invoke(bean, new Object[0]);
> if (!value.getClass().isArray())
> throw new IllegalArgumentException("Property '" + name +
> "' is not indexed");
> return (Array.get(value, index));
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>