public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce•org>
To: Vasyl' Vavrychuk <vvavrychuk@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [EGIT PATCH] Fixed trivial warnings. Mainly parametrized raw types,   added serialVersionUID, removed unnecessery throws.
Date: Sun, 4 Jan 2009 18:19:59 -0800	[thread overview]
Message-ID: <20090105021959.GB20973@spearce.org> (raw)
In-Reply-To: <gjrgip$al9$1@ger.gmane.org>

Vasyl' Vavrychuk <vvavrychuk@gmail•com> 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.

  reply	other threads:[~2009-01-05  2:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04 22:20 [EGIT PATCH] Fixed trivial warnings. Mainly parametrized raw types, added serialVersionUID, removed unnecessery throws Vasyl' Vavrychuk
2009-01-04 23:04 ` Robin Rosenberg
2009-01-05  1:08   ` Vasyl' Vavrychuk
2009-01-05  1:13   ` Vasyl' Vavrychuk
2009-01-04 23:26 ` Vasyl' Vavrychuk
2009-01-05  2:19   ` Shawn O. Pearce [this message]
2009-01-06  0:54   ` Robin Rosenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090105021959.GB20973@spearce.org \
    --to=spearce@spearce$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=vvavrychuk@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox