Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] fixing bug 321502 - lost in polymorphia

2010/8/15 Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx>
2010/8/15 Alex Blewitt <alex.blewitt@xxxxxxxxx>
On 13 Aug 2010, at 23:45, Shawn Pearce <spearce@xxxxxxxxxxx> wrote:

> 3)  We admit that RevObject overridding .equals() is wrong and back
> out that implementation.

Doesn't that break the transitivity of the equals relation in any case? If so, backing out that change would probably be a good idea.

The current equals implementation is also not symmetric across the type hierarchy, e.g.
with
AnyObjectId o1 = ...
RevObject o2 = ...  

o1.equals(o2) may be different from o2.equals(o1)


Now as this problem is fixed by consistently relying on value equality across AnyObjectId's type hierarchy, 
I suspect we could also get rid of or at least simplify ObjectIdSubclassMap. Or do I miss something here ?

I also documented the incompatible change here http://wiki.eclipse.org/JGit/User_Guide#Version_0.9

--
Matthias

Back to the top