tboeghk commented on code in PR #1118:
URL: https://github.com/apache/solr/pull/1118#discussion_r1003649518


##########
solr/core/src/java/org/apache/solr/search/CaffeineCache.java:
##########
@@ -275,7 +275,7 @@ public V computeIfAbsent(K key, IOFunction<? super K, ? 
extends V> mappingFuncti
   @Override
   public V put(K key, V val) {
     inserts.increment();
-    V old = cache.asMap().put(key, val);
+    V old = cache.asMap().compute(key, (k, v) -> val);

Review Comment:
   I wanted to stay in line with the other methods who also call `cache.asMap()`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to