SOLR-13650: compile error fixed

This commit is contained in:
noble 2019-08-20 05:12:58 +10:00
parent b0a11ba5c7
commit 129231d4a7
2 changed files with 7 additions and 5 deletions

View File

@ -110,7 +110,7 @@ public class CacheConfig implements MapWriter {
public <K, V> SolrCacheHolder<K, V> newInstance(SolrCore core) { public <K, V> SolrCacheHolder<K, V> newInstance(SolrCore core) {
return new SolrCacheHolder<>(new CacheInfo(this, core)); return new SolrCacheHolder(new CacheInfo(this, core));
} }
static class CacheInfo { static class CacheInfo {

View File

@ -30,12 +30,14 @@ public class SolrCacheHolder<K, V> implements SolrCache<K,V> {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final CacheConfig factory; private CacheConfig.CacheInfo info;
protected volatile SolrCache<K, V> delegate; protected volatile SolrCache<K, V> delegate;
public SolrCacheHolder(SolrCache<K, V> delegate, CacheConfig factory) {
this.delegate = delegate;
this.factory = factory; public SolrCacheHolder(CacheConfig.CacheInfo cacheInfo) {
this.info = cacheInfo;
this.delegate = cacheInfo.cache;
} }
public int size() { public int size() {