You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/05/20 17:05:48 UTC
[GitHub] [solr] HoustonPutman commented on a change in pull request #135: SOLR-15421 ConfigSetService.checkConfigExists accepts empty configs
HoustonPutman commented on a change in pull request #135:
URL: https://github.com/apache/solr/pull/135#discussion_r636294243
##########
File path: solr/core/src/java/org/apache/solr/cloud/ZkConfigSetService.java
##########
@@ -151,6 +151,19 @@ public boolean checkConfigExists(String configName) throws IOException {
}
}
+ @Override
+ public boolean checkConfigExistsWithSolrConfigXml(String configName) throws IOException {
+ try {
+ Boolean existsConfig = zkClient.exists(CONFIGS_ZKNODE + "/" + configName, true);
+ if (existsConfig == null || existsConfig.booleanValue() == false) return false;
+ Boolean existsSolrConfigXml = zkClient.exists(CONFIGS_ZKNODE + "/" + configName + "/solrconfig.xml", true);
+ return existsSolrConfigXml;
Review comment:
If there is a `existsConfig == null` check above, there should be one here as well, otherwise there will be a NPE.
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org