Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 92FAE11AA4 for ; Thu, 24 Apr 2014 08:23:50 +0000 (UTC) Received: (qmail 8406 invoked by uid 500); 24 Apr 2014 08:23:18 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 8015 invoked by uid 500); 24 Apr 2014 08:23:16 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 7944 invoked by uid 99); 24 Apr 2014 08:23:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 08:23:15 +0000 Date: Thu, 24 Apr 2014 08:23:15 +0000 (UTC) From: "Emmanuel Bourg (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (BCEL-140) org.apache.bcel.generic.Instruction.equals(Object) does not follow Object.equals(Object) rules MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BCEL-140?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bourg updated BCEL-140: -------------------------------- Priority: Blocker Environment: (was: Operating System: All Platform: All) Fix Version/s: 6.0 > org.apache.bcel.generic.Instruction.equals(Object) does not follow Object= .equals(Object) rules > -------------------------------------------------------------------------= --------------------- > > Key: BCEL-140 > URL: https://issues.apache.org/jira/browse/BCEL-140 > Project: Commons BCEL > Issue Type: Bug > Components: Main > Affects Versions: 5.2 > Reporter: V=C3=ADt =C5=A0est=C3=A1k aka v6ak > Assignee: Apache Commons Developers > Priority: Blocker > Fix For: 6.0 > > > org.apache.bcel.generic.Instruction contains two strange methods: equals = and setComparator. The equals and hashCode methods are by definition (see h= ttp://java.sun.com/javase/6/docs/api/java/lang/Object.html#hashCode%28%29 )= broken: > * If two Instruction objects have another InstructionComparator, they can= be asymmetrically equal. > * If instructions aren't compared by identity (=3D=3D), the inherited has= hCode method is by definition broken. > I suggest: deprecate setComparator method. -- This message was sent by Atlassian JIRA (v6.2#6252)