commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Senén de Diego <>
Subject [beanutils][PATCH] handling Map instances in PropertyUtilsBean
Date Wed, 11 Feb 2004 16:43:52 GMT
Hello everybody,
This is my first post so I hope it makes sense...
As PropertyUtilsBean is currently implemented, calling

    Map bean = new HashMap();
    String property = "someProperty";
    bean.put( property, someObject );
    getNestedProperty( bean, property );

would work, but calling

    getSimplePropery( bean, property );

would throw a NoSuchMethodException.

Is there any reason for that behavior?. IMHO that's not coherent, and I
that Map instances should be handled inside
(g|s)etSimpleProperty, instead of within (g|s)etNestedProperty.

I attach a patch with what, in my opinion, should be changed.
Senén de Diego

View raw message