From ca4fc9b9123e314c34ee108e71393800a892f239 Mon Sep 17 00:00:00 2001 From: noble Date: Tue, 20 Aug 2019 05:12:58 +1000 Subject: [PATCH] SOLR-13650: compile error fixed --- .../src/java/org/apache/solr/search/CacheConfig.java | 2 +- .../java/org/apache/solr/search/SolrCacheHolder.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/search/CacheConfig.java b/solr/core/src/java/org/apache/solr/search/CacheConfig.java index a564512e3c1..cc92f0dce39 100644 --- a/solr/core/src/java/org/apache/solr/search/CacheConfig.java +++ b/solr/core/src/java/org/apache/solr/search/CacheConfig.java @@ -110,7 +110,7 @@ public class CacheConfig implements MapWriter { public SolrCacheHolder newInstance(SolrCore core) { - return new SolrCacheHolder<>(new CacheInfo(this, core)); + return new SolrCacheHolder(new CacheInfo(this, core)); } static class CacheInfo { diff --git a/solr/core/src/java/org/apache/solr/search/SolrCacheHolder.java b/solr/core/src/java/org/apache/solr/search/SolrCacheHolder.java index 86f6b2d46cc..9f1e124592f 100644 --- a/solr/core/src/java/org/apache/solr/search/SolrCacheHolder.java +++ b/solr/core/src/java/org/apache/solr/search/SolrCacheHolder.java @@ -30,12 +30,14 @@ public class SolrCacheHolder implements SolrCache { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private final CacheConfig factory; + private CacheConfig.CacheInfo info; protected volatile SolrCache delegate; - public SolrCacheHolder(SolrCache delegate, CacheConfig factory) { - this.delegate = delegate; - this.factory = factory; + + + public SolrCacheHolder(CacheConfig.CacheInfo cacheInfo) { + this.info = cacheInfo; + this.delegate = cacheInfo.cache; } public int size() {