You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/10/14 18:30:57 UTC
DO NOT REPLY [Bug 23815] -
PropertyUtils.getNestedProperty() doesn't allow getXxxx on Map-Instances any longer
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23815>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23815
PropertyUtils.getNestedProperty() doesn't allow getXxxx on Map-Instances any longer
------- Additional Comments From tsahling@hausmannwynen.de 2003-10-14 16:30 -------
I temporarely compiled a new class and put it into the beanutils.jar. By
this I made Struts 1.1 backward compatible:
public static Object getNestedProperty(Object bean, String name)
throws IllegalAccessException, InvocationTargetException,
NoSuchMethodException {
...
indexOfINDEXED_DELIM = name.indexOf(INDEXED_DELIM);
indexOfMAPPED_DELIM = name.indexOf(MAPPED_DELIM);
/**
* TEMP FIX!
*/
// if (bean instanceof Map) {
// bean = ((Map) bean).get(name);
//} else
if (indexOfMAPPED_DELIM >= 0) {
bean = getMappedProperty(bean, name);
} else if (indexOfINDEXED_DELIM >= 0) {
bean = getIndexedProperty(bean, name);
} else {
bean = getSimpleProperty(bean, name);
}
return bean;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org