[Change] 补充 HashMapCacheStore 对参数的 null 检查;

[Change] HashMapCacheStore 增加对参数的 null 检查, 及时抛出 NPE;
This commit is contained in:
LamGC 2020-09-04 23:30:35 +08:00
parent 455f922cca
commit 06c3af9350
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -38,7 +38,7 @@ public class HashMapCacheStore<V> extends HashCacheStore<Map<String, V>> impleme
@Override
public Set<String> mapFieldSet(String key) {
return getMap(key, false, Map::keySet, null);
return getMap(key, false, map -> Collections.unmodifiableSet(map.keySet()), null);
}
@Override