commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Laird" <Laird.Nel...@FMR.COM>
Subject RE: [Unverified Sender] RE: [Unverified Sender] RE: [BeanUtils] " Diff" for beans?
Date Wed, 29 Jan 2003 20:10:31 GMT
> -----Original Message-----
> From: Nelson, Laird [mailto:Laird.Nelson@fmr.com]
> Is there a
> requirement for indexed properties that the count/length/size of the
> collection be exposed?

{closes the JavaBeans specification}

The answer is no.

So I guess in the case of removals I could just err on the side of returning
too much.  That is, if the comparison graph differs from the reference graph
only by having fewer children under the root node, then I might return the
root node and all of its first-level children, with none of their properties
set.  Strictly speaking of course none of these nodes' properties has
changed, but perhaps the redundancy is OK here to indicate that a sibling
node has been removed.

(I know for my own special-purpose situation here that that's how the
callers of this hypothetical piece of code will expect it to work, but that
certainly doesn't mean it's necessarily the right way to do it.  They are
only interested in this "diffish" thing to reduce graph sizes; if there are
a couple of things that were marked as different that were really the same,
it's not a big deal.  (Incidentally, isn't that the way diff works anyhow?
Occasionally you'll get a little bit that is the same in both things being
compared?))

Laird

Mime
View raw message