libgcj/2357: HashMap does not handle initialCapacity=0 correctly
Bryce McKinlay
bryce@albatross.co.nz
Sat Mar 24 00:09:00 GMT 2001
mark@klomp.org wrote:
> >Description:
> When the initialCapacity of a HashMap is zero then bucket.length will be zero and then you will get a ArithmetichException in the hash() method.
I've checked in this fix. It seems better to simply bump the initialCapacity to 1 if 0 is given, than to add a special case in hash(), making it slower.
regards
[ bryce ]
More information about the Java-patches
mailing list