mirror of https://github.com/apache/lucene.git
SOLR-2331: fix Windows file deletion failure due to a lock held by an unclosed anonymous input stream created for the purpose of debug printing; also, wrap the debug printing in an 'if (VERBOSE) { }' block so that it doesn't get ordinarily get invoked.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1144088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd55ad4397
commit
28dab8437f
|
@ -203,7 +203,14 @@ public class TestSolrProperties extends LuceneTestCase {
|
|||
|
||||
mcr = CoreAdminRequest.persist("solr-persist.xml", coreadmin);
|
||||
|
||||
System.out.println(IOUtils.toString(new FileInputStream(new File(solrXml.getParent(), "solr-persist.xml"))));
|
||||
if (VERBOSE) {
|
||||
FileInputStream fis = new FileInputStream(new File(solrXml.getParent(), "solr-persist.xml"));
|
||||
try {
|
||||
System.out.println(IOUtils.toString(fis));
|
||||
} finally {
|
||||
fis.close();
|
||||
}
|
||||
}
|
||||
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
||||
FileInputStream fis = new FileInputStream(new File(solrXml.getParent(), "solr-persist.xml"));
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue