jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48321] New: org.apache.bcel.generic.Instruction.equals(Object) does not follow Object.equals(Object) rules
Date Tue, 01 Dec 2009 16:18:34 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48321

           Summary: org.apache.bcel.generic.Instruction.equals(Object)
                    does not follow Object.equals(Object) rules
           Product: BCEL
           Version: 5.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: bcel-dev@jakarta.apache.org
        ReportedBy: qweasd-v6ak@soukroma.cz


org.apache.bcel.generic.Instruction contains two strange methods: equals and
setComparator. The equals and hashCode methods are by definition (see
http://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 (==), the inherited hashCode
method is by definition broken.

I suggest: deprecate setComparator method.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


Mime
View raw message