You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Arron Bates <ar...@keyboardmonkey.com> on 2002/01/04 00:47:19 UTC

[PATCH] - bug 5639

  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));