git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 5, 2009, 02:19 UTC
Message-ID
<20090105021959.GB20973@spearce.org>
In-Reply-To
<gjrgip$al9$1@ger.gmane.org>
Vasyl' Vavrychuk <vvavrychuk@gmail.com> wrote:
Show 6 quoted lines
> 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.
Previous: Vasyl' VavrychukNext: Robin Rosenberg
Message 6 of 7 in “Fixed trivial warnings. Mainly parametrized raw types, added serialVersionUID, removed unnecessery throws.”
  1. Fixed trivial warnings. Mainly parametrized raw types, added serialVersionUID, removed unnecessery throws.Vasyl' Vavrychuk, Jan 4, 2009
  2. Robin RosenbergJan 4, 2009
  3. Vasyl' VavrychukJan 5, 2009
  4. Vasyl' VavrychukJan 5, 2009
  5. Vasyl' VavrychukJan 4, 2009
  6. Shawn O. PearceJan 5, 2009
  7. Robin RosenbergJan 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.