From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Shawn O. Pearce" 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 Message-ID: <20090105021959.GB20973@spearce.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org To: Vasyl' Vavrychuk X-From: git-owner@vger.kernel.org Mon Jan 05 03:21:24 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LJf5n-0007AG-Ep for gcvg-git-2@gmane.org; Mon, 05 Jan 2009 03:21:23 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827AbZAECUD (ORCPT ); Sun, 4 Jan 2009 21:20:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751853AbZAECUD (ORCPT ); Sun, 4 Jan 2009 21:20:03 -0500 Received: from george.spearce.org ([209.20.77.23]:41287 "EHLO george.spearce.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751729AbZAECUB (ORCPT ); Sun, 4 Jan 2009 21:20:01 -0500 Received: by george.spearce.org (Postfix, from userid 1001) id 07DEE38210; Mon, 5 Jan 2009 02:20:00 +0000 (UTC) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Vasyl' Vavrychuk wrote: > Not sure what is right: > public abstract class AnyObjectId implements Comparable { > or > public abstract class AnyObjectId implements Comparable { > > 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.