SOLR-4525, another place where I missed closing the stream

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1452321 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erick Erickson 2013-03-04 14:20:39 +00:00
parent 34910535b3
commit 372a592f90
1 changed files with 8 additions and 4 deletions

View File

@ -17,6 +17,7 @@ import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.io.IOUtils;
import org.apache.solr.common.cloud.OnReconnect;
import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.core.ConfigSolr;
@ -183,17 +184,20 @@ public class ZkCLI {
}
InputStream is = new FileInputStream(configFile);
//ConfigSolrXmlThunk cfg = new ConfigSolrXmlThunk(null, loader, is, false, true);
ConfigSolr cfg;
try {
if (isXml) {
cfg = new ConfigSolrXmlBackCompat(loader, null, is, null, false);
} else {
cfg = new SolrProperties(null, is, null);
}
} finally {
IOUtils.closeQuietly(is);
}
if(!ZkController.checkChrootPath(zkServerAddress, true)) {
if(!ZkController.checkChrootPath(zkServerAddress, true)) {
System.out.println("A chroot was specified in zkHost but the znode doesn't exist. ");
System.exit(1);
}