See gh-26320
This commit is contained in:
Brian Clozel 2022-09-02 10:55:40 +02:00
parent 73abd58202
commit fc47d25bc7
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ public final class ConcurrentLruCache<K, V> {
Assert.notNull(value, "value should not be null");
final CacheEntry<V> cacheEntry = new CacheEntry<>(value, CacheEntryState.ACTIVE);
final Node<K, V> node = new Node<>(key, cacheEntry);
final Node<K, V> prior = this.cache.put(node.key, node);
final Node<K, V> prior = this.cache.putIfAbsent(node.key, node);
if (prior == null) {
processWrite(new AddTask(node));
}