commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [BeanUtils] "Diff" for beans?
Date Wed, 29 Jan 2003 18:44:24 GMT

Any reason why this is "Diff" for beans and not just "Diff" for Java

There's a project for doing diff's between jars [though it needs the
source I think]. I've been using a script to do diff's between class jars.
Doesn't work too well, but well enough.


On Wed, 29 Jan 2003, Nelson, Laird wrote:

> For some rather absurd reasons, I find I'm in need of a diff-like engine for
> JavaBeans graphs.  I need to take two of these graphs, each of whose nodes
> could be equal or different, and construct a new graph that contains only
> those paths containing nodes that are different.
> This involves doing several things to Javabeans that it looks like BeanUtils
> should be able to handle:
> 1. copy a bean, whether it's cloneable or not (handled)
> 2. compare two bean graphs for equality based solely on the property
> descriptors (not handled?)
> 3. (finally) take in two graphs and build a third consisting of the
> difference (not handled)
> (1) is handled by BeanUtils.clone(Object).  I didn't see anything for
> (2)--there is BeanComparator, but it depends on a *single* property, not all
> the properties.  Obviously I could write something that loops over that, but
> I thought I'd ask in case I'm missing something easier.  Finally, (3), it
> seems to me, is not handled at all.
> Is this the state of the union?  If so, and if I write this silly thing,
> I'll contribute back (if anyone's interested).
> Cheers,
> Laird
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message