commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Senén de Diego <sdedi...@wanadoo.es>
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
believe
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.
Bye,
Senén de Diego

Mime
View raw message