IdentityHashMap.java (put): Set new threshold correctly when resizing table.
* java/util/IdentityHashMap.java (put): Set new threshold correctly when resizing table. From-SVN: r51752
This commit is contained in:
parent
8d5b4d0bf5
commit
c8d9e398e3
|
@ -1,3 +1,8 @@
|
|||
2002-04-02 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
|
||||
|
||||
* java/util/IdentityHashMap.java (put): Set new threshold correctly
|
||||
when resizing table.
|
||||
|
||||
2002-04-01 Loren J. Rittle <ljrittle@acm.org>
|
||||
|
||||
* include/posix-threads.h: Support <.../pal.h> on FreeBSD/alpha.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue