From df88ca6f494148e54eead96e67ca64a1e7533081 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Tue, 2 Apr 2002 13:55:14 +0000 Subject: [PATCH] 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 --- libjava/ChangeLog | 5 +++++ libjava/java/util/IdentityHashMap.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 4fe72e6e7ea..0f962bef22e 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 e6cd8c6d249..4609f015f8d 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) { -- 2.30.2