mirror of https://github.com/apache/lucene.git
SOLR-10639: Fix NPE in LRU/LFU/FastLRU caches toString method
This commit is contained in:
parent
82b78bd95e
commit
fbdd2c0ee8
|
@ -324,6 +324,8 @@ Bug Fixes
|
|||
* SOLR-10630: HttpSolrCall.getAuthCtx().new AuthorizationContext() {...}.getParams()
|
||||
sometimes throws java.lang.NullPointerException (hu xiaodong via shalin)
|
||||
|
||||
* SOLR-10639: Fix NPE on LRU/FastLRU/LFU toString method (Tomás Fernández Löbbe)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ public class FastLRUCache<K, V> extends SolrCacheBase implements SolrCache<K,V>
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name() + cacheMap != null ? cacheMap.getValue().toString() : "";
|
||||
return name() + (cacheMap != null ? cacheMap.getValue().toString() : "");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ public class LFUCache<K, V> implements SolrCache<K, V> {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name + cacheMap != null ? cacheMap.getValue().toString() : "";
|
||||
return name + (cacheMap != null ? cacheMap.getValue().toString() : "");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -375,7 +375,7 @@ public class LRUCache<K,V> extends SolrCacheBase implements SolrCache<K,V>, Acco
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name() + cacheMap != null ? cacheMap.getValue().toString() : "";
|
||||
return name() + (cacheMap != null ? cacheMap.getValue().toString() : "");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue