commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Aymé <>
Subject Re: Bean merge
Date Wed, 15 Dec 2010 09:30:49 GMT
you could see the issue BEANUTILS-304 :

Or you could enhance BeanUtils class  by duplicating copyProperties
method into a new copyNonNullProperties method
(which would copy all non-null properties from src into dest).

Then the merge algorithm would be something like this:
Bean mergeInto = new Bean();
BeanUtils.copyProperties(defaultValuesBean, mergeInto);
BeanUtils.copyNonNullProperties(srcBean, mergeInto);

This way, the new mergeInto bean will have all the non null properties
of the src bean and the other properties of the defaultValuesBean.



2010/12/14 Mateus Brum <>:
> Is there some implementation of bean merge in BeanUtils?
> If not how do I propose such implementation?
> Thanks.
> --
> *Mateus Henrique Brum*
> *Desenvolvedor de Softwares Corporativos*
> *NOVO CELULAR : (12) 8200-0919*

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message