[kaffe] HashMap putAll/putAllInternal bug

Dalibor Topic robilad at kaffe.org
Sun Oct 5 10:14:02 PDT 2003

Hi Stuart,

Stuart Ballard wrote:
> (sent to classpath, but their mailing list is a blackhole at the moment 
> and, being impatient, I figured I'd send to Kaffe where it's also 
> relevant, since Kaffe's collections classes come from Classpath)
> The HashMap putAll and putAllInternal (called from constructor) methods
> use size() to get the size of the map to be added, and then iterate over
> the iterator that many times to add elements. Instead, they should call
> hasNext() on the iterator.

thanks for the patch, it's now fixed in kaffe. I hope you can get the 
code into Classpath, too. Fight premature micro-optimizations! ;)

dalibor topic

More information about the kaffe mailing list