You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2008/10/30 17:11:21 UTC
svn commit: r709189 -
/lucene/solr/trunk/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java
Author: yonik
Date: Thu Oct 30 09:11:20 2008
New Revision: 709189
URL: http://svn.apache.org/viewvc?rev=709189&view=rev
Log:
SOLR-667: fix incorrect put() fix
Modified:
lucene/solr/trunk/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java
Modified: lucene/solr/trunk/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java?rev=709189&r1=709188&r2=709189&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/common/util/ConcurrentLRUCache.java Thu Oct 30 09:11:20 2008
@@ -83,7 +83,7 @@
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) {