From: Bryce McKinlay Date: Tue, 2 Apr 2002 13:55:14 +0000 (+0000) Subject: IdentityHashMap.java (put): Set new threshold correctly when resizing table. X-Git-Tag: releases/gcc-3.3.0~5951 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df88ca6f494148e54eead96e67ca64a1e7533081;p=thirdparty%2Fgcc.git IdentityHashMap.java (put): Set new threshold correctly when resizing table. * java/util/IdentityHashMap.java (put): Set new threshold correctly when resizing table. From-SVN: r51751 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 4fe72e6e7ea9..0f962bef22e4 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2002-04-02 Bryce McKinlay + + * java/util/IdentityHashMap.java (put): Set new threshold correctly + when resizing table. + 2002-04-01 Mark Wielaard * java/util/BitSet.java (BitSet(int)): if nbits < 0 throw diff --git a/libjava/java/util/IdentityHashMap.java b/libjava/java/util/IdentityHashMap.java index e6cd8c6d249a..4609f015f8d4 100644 --- a/libjava/java/util/IdentityHashMap.java +++ b/libjava/java/util/IdentityHashMap.java @@ -490,7 +490,7 @@ public class IdentityHashMap extends AbstractMap table = new Object[old.length * 2 + 2]; Arrays.fill(table, emptyslot); size = 0; - threshold = table.length / 4 * 3; + threshold = (table.length / 2) / 4 * 3; for (int i = old.length - 2; i >= 0; i -= 2) {