[
https://issues.apache.org/jira/browse/BCEL-140?page=com.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ít Šesták 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
> 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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)