501 |
|
(int)ft : MAXIMUM_CAPACITY); |
502 |
|
if (t > threshold) |
503 |
|
threshold = tableSizeFor(t); |
504 |
+ |
} else { |
505 |
+ |
// Because of linked-list bucket constraints, we cannot |
506 |
+ |
// expand all at once, but can reduce total resize |
507 |
+ |
// effort by repeated doubling now vs later |
508 |
+ |
while (s > threshold && table.length < MAXIMUM_CAPACITY) |
509 |
+ |
resize(); |
510 |
|
} |
511 |
< |
else if (s > threshold) |
506 |
< |
resize(); |
511 |
> |
|
512 |
|
for (Map.Entry<? extends K, ? extends V> e : m.entrySet()) { |
513 |
|
K key = e.getKey(); |
514 |
|
V value = e.getValue(); |