You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2009/12/01 17:18:34 UTC
DO NOT REPLY [Bug 48321] New:
org.apache.bcel.generic.Instruction.equals(Object) does not follow
Object.equals(Object) rules
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