bug report in String.hashCode()

Archie Cobbs archie at whistle.com
Wed Aug 5 15:17:47 PDT 1998


Tony Kimball writes:
> Quoth Archie Cobbs on Wed, 5 August:
> : > 	if (hash == 0 && count > 0)
> : 
> : Sure.. if you're willing to live with that 1/2^32 chance... :-)
> : 
> 
> You would increment it if zero when computing, leaving 0 out of range.

Nope, that changes the algorithm, which is explicitly specified.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


More information about the kaffe mailing list