|
From: | Stuart Ballard |
Subject: | Re: [really patch] Re: HashMap putAll/putAllInternal bug |
Date: | Wed, 22 Oct 2003 10:59:22 -0400 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031010 Debian/1.4-6 |
Eric Blake wrote:
Sun seems to be blessing the use of hasNext() here, by not documenting that this should optimize to calling size().
Good point.Since this patch still hasn't been applied, this message is another attempt to try to figure out if there's any consensus about it.
There have been lots of suggestions as to ways I could or should improve my code to not rely on this behavior (and in fact I have taken this approach: my code now works around the problem by not calling putAll() but manually looping over the elements and calling put() instead), but I'm not sure whether there have been any objections to applying the patch regardless, in order to match Sun's behavior and provide acceptable performance when size() is slow.
I'm aware that several people are of the "I'm not too keen on it and it shouldn't be necessary for properly written code" point of view, but I'm not aware of any that go so far as "This patch should not be applied". If you are such a person, please speak up.
If nobody speaks up, may I suggest that the consensus is "reluctantly apply it" - and in that case, could someone do so?
Thanks, Stuart. -- Stuart Ballard, Senior Web Developer FASTNET - Web Solutions (215) 283-2300, ext. 126 www.fast.net
[Prev in Thread] | Current Thread | [Next in Thread] |