Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 48372 invoked from network); 30 Sep 2008 01:14:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Sep 2008 01:14:09 -0000 Received: (qmail 27249 invoked by uid 500); 30 Sep 2008 01:14:06 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 27162 invoked by uid 500); 30 Sep 2008 01:14:05 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 27151 invoked by uid 99); 30 Sep 2008 01:14:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 18:14:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2008 01:13:12 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 72957234C1F4 for ; Mon, 29 Sep 2008 18:13:46 -0700 (PDT) Message-ID: <1595058442.1222737226468.JavaMail.jira@brutus> Date: Mon, 29 Sep 2008 18:13:46 -0700 (PDT) From: "Suresh Srinivas (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-4210) Findbugs warnings are printed related to equals implementation of several classes In-Reply-To: <1779474596.1221787004173.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-4210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Suresh Srinivas updated HADOOP-4210: ------------------------------------ Hadoop Flags: [Incompatible change, Reviewed] (was: [Reviewed, Incompatible change]) Status: Patch Available (was: Open) > Findbugs warnings are printed related to equals implementation of several classes > --------------------------------------------------------------------------------- > > Key: HADOOP-4210 > URL: https://issues.apache.org/jira/browse/HADOOP-4210 > Project: Hadoop Core > Issue Type: Bug > Reporter: Suresh Srinivas > Assignee: Suresh Srinivas > Fix For: 0.20.0 > > Attachments: HADOOP-4210.patch, HADOOP-4210.patch, HADOOP4210.patch > > > During compilation - findbugs generates several warnings that indicates bugs in the implementation of equals method. One of the example of this report is: > Bug type EQ_GETCLASS_AND_CLASS_CONSTANT (click for details) > In class org.apache.hadoop.mapred.ID > In method org.apache.hadoop.mapred.ID.equals(Object) > At ID.java:[line 66] > Value doesn't work for subtypes > This class has an equals method that will be broken if it is inherited by subclasses. It compares a class literal with the class of the argument (e.g., in class Foo it might check if Foo.class == o.getClass()). It is better to check if this.getClass() == o.getClass(). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.