Hi William, William Speirs wrote:
> I'm not sure I understand your comment Mat. From what I can tell, Michael > made his own hash function. That's fine, but *might* have unexpected > collision issues. Might not too... I don't know. My guess though is that > he's not an expert (who is an expert on hash functions?) and might > unknowingly fall into a trap here. > > For example, commons-lang HashBuilder uses 37 as the "prime" and 17 as the > initial result... Michael didn't. Maybe he's OK, maybe he's not... but why > risk it? Why not just use the library and not reinvent the wheel? (Most > valid reason would be not wanting to pull in a whole library for these two > functions/classes.) Maybe because it can be dead-slow? https://www.mail-archive.com/user@xstream.codehaus.org/msg00677.html I use HashCodeBuilder and EqualsBilder for Mock objects only ... for good reason. Cheers, Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org