We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71be325 commit be55c43Copy full SHA for be55c43
1 file changed
docs/java/collection/concurrent-hash-map-source-code.md
@@ -328,7 +328,7 @@ private void rehash(HashEntry<K,V> node) {
328
HashEntry<K,V> e = oldTable[i];
329
if (e != null) {
330
HashEntry<K,V> next = e.next;
331
- // 计算新的位置,新的位置只可能是不便或者是老的位置+老的容量。
+ // 计算新的位置,新的位置只可能是不变或者是老的位置+老的容量。
332
int idx = e.hash & sizeMask;
333
if (next == null) // Single node on list
334
// 如果当前位置还不是链表,只是一个元素,直接赋值
@@ -337,7 +337,7 @@ private void rehash(HashEntry<K,V> node) {
337
// 如果是链表了
338
HashEntry<K,V> lastRun = e;
339
int lastIdx = idx;
340
- // 新的位置只可能是不便或者是老的位置+老的容量。
+ // 新的位置只可能是不变或者是老的位置+老的容量。
341
// 遍历结束后,lastRun 后面的元素位置都是相同的
342
for (HashEntry<K,V> last = next; last != null; last = last.next) {
343
int k = last.hash & sizeMask;
0 commit comments