提交 d55355a3 authored 作者: Thomas Mueller's avatar Thomas Mueller

Bugfix (TestIntIntHashMap failed)

上级 41064ff5
...@@ -104,11 +104,11 @@ public abstract class HashBase { ...@@ -104,11 +104,11 @@ public abstract class HashBase {
if (newLevel > 30) { if (newLevel > 30) {
throw new IllegalStateException("exceeded max size of hash table"); throw new IllegalStateException("exceeded max size of hash table");
} }
minSize = size * 3 / 4;
size = 0; size = 0;
level = newLevel; level = newLevel;
len = 2 << level; len = 2 << level;
mask = len - 1; mask = len - 1;
minSize = (int) ((1 << level) * MAX_LOAD / 100);
maxSize = (int) (len * MAX_LOAD / 100); maxSize = (int) (len * MAX_LOAD / 100);
deletedCount = 0; deletedCount = 0;
maxDeleted = 20 + len / 2; maxDeleted = 20 + len / 2;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论