More naive questions:
It seems like instead of having EntityProxy.equals() work in two
different ways, we should inline AutoBeanUtils.diff() and simplify it to
do exactly what we want for this case, without relying on
Object.equals() if possible? We don't care what the diffs are and can
return early as soon as we find one, so AutoBeanUtils.diff() does too
much work in any case. (And maybe we can order the comparisons to do the
cheap ones first?)
This would get rid of the "diffing" flag and the spooky action at a
distance based on a magic flag.
I also wonder if the equals() check is just a mistake. The beginning of
AutoBeansUtils.diff() looks like this:
// Fast check for comparing an object to itself
if (a.equals(b)) {
return Collections.emptyMap();
}
If we wanted a "fast check", shouldn't this be a==b, not a.equals(b)? I
suppose it was written assuming that a Category wouldn't be used to
override equals().
http://gwt-code-reviews.appspot.com/1601806/
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors