On 5/16/10 11:37 PM, Felix Knecht wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Definitively not a false positive. Implementing the equals() method does
not works if we don't implement hashcade() at the same time.
IMO we can use for most HashCodeBuilder [1] and appending the same
fields used in the equals method.
Do you think this is a way to go or does this end up in performance issues?
IMO, writing a decent HashCode() method is simple. No need to use this
HashCodeBuilder that don't lnow how to deal with Object (it simply add
the object.hashcode() to the computed hash code, which is bad).
This hashCodeBuilder() method is only called in one place in the whole
code (ArrayUtils), and I'm not even sure it's useful.
Anyway, just use the commons-lang one in ArrayUtils, and delete this
method from the code forever :)
--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com