This commit is contained in:
Looly 2024-03-20 16:37:23 +08:00
parent f4885c27e8
commit a18b4f2519

View File

@ -177,6 +177,7 @@ public class ReferenceKeyConcurrentMap<K, V> implements ConcurrentMap<K, V>, Ite
@Override
public Set<K> keySet() {
this.purgeStaleKeys();
// TODO 非高效方式的set转换应该返回一个view
final Collection<K> trans = CollUtil.trans(this.raw.keySet(), (reference) -> null == reference ? null : reference.get());
return new HashSet<>(trans);