commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23815] - PropertyUtils.getNestedProperty() doesn't allow getXxxx on Map-Instances any longer
Date Tue, 14 Oct 2003 16:30:57 GMT
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


Mime
View raw message