[Soot-list] JimpleLocal.equals()
Michael Faes
rolve at trick17.ch
Mon Jan 28 15:04:17 EST 2013
Hi everyone,
I'm currently having problems with the implementation of
JimpleLocal.equals() and equivTo():
/**
* Returns true if the given object is structurally equal to this one.
*/
public boolean equivTo(Object o) {
return this.equals( o );
}
While the Javadoc says that structural equivalence is tested (which is a
sensible thing to do), actually object identity is tested, as the
equals() method is not overridden (which does not seem to be so
sensible). In addition, the hashCode() method is overridden in a
structure-based way, which (is legal but) makes even less sense to me.
Does anybody know if there is a reason for all this or can I safely
replace the current equals method with a structure-based one?
Thanks for your time.
Michael
More information about the Soot-list
mailing list