Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [EGIT PATCH] Fixed trivial warnings. Mainly parametrized raw types, added serialVersionUID, removed unnecessery throws.

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:52

Vasyl' Vavrychuk [off-list ref] wrote:
Not sure what is right:
public abstract class AnyObjectId implements Comparable<ObjectId> {
or
public abstract class AnyObjectId implements Comparable<AnyObjectId> {

IMHO second, but class AnyObjectId contains some compareTo(ObjectId).
 
Hmmph.  That probably can be AnyObjectId.  At one point we only had
ObjectId, then AnyObjectId was introduced as a base so we can have
the immutable AnyObjectId and the mutable MutableObjectId subclasses.

compareTo doesn't care about the mutable state of its argument, this
is probably left-over code that didn't get converted when we added
the AnyObjectId base class.

So it should be the second, and the compareTo method should be made
to match that.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help