Just stumbled across this when running Optimizeit over an app that uses
Lucene. Isn't the XOR operator more normally used in hashCode() as it
mixes and distributes the bits more, or is the reasoning that the hash
code of strings are already mixed decently enough? I don't even know if
this routine is being called -just a source code inspection question.
This is the code:
public final int hashCode() {
return field.hashCode() + text.hashCode();
}
And my suggestion means changing the "+" to a "^".
-- Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]