Skip to content

Commit fc47d25

Browse files
committed
Polish
See gh-26320
1 parent 73abd58 commit fc47d25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/util/ConcurrentLruCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private void put(K key, V value) {
110110
Assert.notNull(value, "value should not be null");
111111
final CacheEntry<V> cacheEntry = new CacheEntry<>(value, CacheEntryState.ACTIVE);
112112
final Node<K, V> node = new Node<>(key, cacheEntry);
113-
final Node<K, V> prior = this.cache.put(node.key, node);
113+
final Node<K, V> prior = this.cache.putIfAbsent(node.key, node);
114114
if (prior == null) {
115115
processWrite(new AddTask(node));
116116
}

0 commit comments

Comments
 (0)