Apache Lucene open-source search software
SOLR-667: fix incorrect put() fix
Yonik Seeley9071230c7308
diff --git a/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java b/src/java/org/apache/solr/common/util/ConcurrentLRUCache.javaindex 3b3fa95a2e2..5ebdef848d5 100644--- a/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java+++ b/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java@@ -83,7 +83,7 @@ public class ConcurrentLRUCache {if (val == null) return null;CacheEntry e = new CacheEntry(key, val, stats.accessCounter.incrementAndGet());CacheEntry oldCacheEntry = map.put(key, e);- if (oldCacheEntry != null) {+ if (oldCacheEntry == null) {stats.size.incrementAndGet();}if (islive) {