[Soot-list] bug with makeAllocNode?

Patrick Lam plam at cs.mcgill.ca
Mon Dec 7 11:04:23 EST 2009


lpxz wrote:
> we can see that two JNewExpr objects have the same hashcode although
> they are of different types.

Hi Peng,

It seems that you're assuming that two objects with the same hashCode
are equal. That's not the guarantee from hashCode. hashCode guarantees
that objects with different hashCodes are different. That's why you
typically have to use chaining when you implement a hash table, and also
why it is acceptable for a hashCode implementation to always return 0.

Let me know if I misread your mail.

pat


More information about the Soot-list mailing list