bruno-roustant commented on a change in pull request #147:
URL: https://github.com/apache/solr/pull/147#discussion_r644553881
##########
File path:
solr/core/src/java/org/apache/solr/core/TransientSolrCoreCacheDefault.java
##########
@@ -124,38 +142,29 @@ public SolrCore addCore(String name, SolrCore core) {
@Override
public Set<String> getLoadedCoreNames() {
- return Collections.unmodifiableSet(transientCores.keySet());
+ return Collections.unmodifiableSet(transientCores.asMap().keySet());
}
- // Remove a core from the internal structures, presumably it
- // being closed. If the core is re-opened, it will be re-added by
CoreContainer.
@Override
public SolrCore removeCore(String name) {
- return transientCores.remove(name);
+ return transientCores.asMap().remove(name);
}
- // Get the core associated with the name. Return null if you don't want this
core to be used.
@Override
public SolrCore getCore(String name) {
- return transientCores.get(name);
+ return name == null ? null : transientCores.asMap().get(name);
Review comment:
Sounds good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]