mirror of
https://gitee.com/arthas/arthas.git
synced 2024-12-02 12:17:45 +08:00
use Arrays.fill (#1989)
This commit is contained in:
parent
d88a2e93d1
commit
58b5381374
@ -26,6 +26,7 @@ import java.lang.ref.WeakReference;
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.AbstractSet;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.Enumeration;
|
||||
@ -619,10 +620,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
||||
if (count != 0) {
|
||||
lock();
|
||||
try {
|
||||
HashEntry<K, V>[] tab = table;
|
||||
for (int i = 0; i < tab.length; i ++) {
|
||||
tab[i] = null;
|
||||
}
|
||||
Arrays.fill(table, null);
|
||||
++ modCount;
|
||||
// replace the reference queue to avoid unnecessary stale
|
||||
// cleanups
|
||||
|
Loading…
Reference in New Issue
Block a user