SOLR-1598 Reader used in PlainTextEntityProcessor.nextRow() is not explicitly closed

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@889541 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-12-11 09:24:14 +00:00
parent b51f7c5fd6
commit 77847c6396
2 changed files with 9 additions and 1 deletions

View File

@ -22,10 +22,14 @@ New Features
----------------------
* SOLR-1525 allow DIH to refer to core properties (noble)
* SOLR-1547 TemplateTransformer copy objects more intelligently when there when the template is a single variable (noble)
* SOLR-1627 VariableResolver should be fetched just in time (noble)
* SOLR-1583 Create DataSources that return InputStream (noble)
Optimizations
----------------------
@ -36,6 +40,8 @@ Bug Fixes
* SOLR-1639: Fixed misleading error message when dataimport.properties is not writable (shalin)
* SOLR-1598: Reader used in PlainTextEntityProcessor is not explicitly closed (Sascha Szott via noble)
Other Changes
----------------------

View File

@ -19,6 +19,7 @@ package org.apache.solr.handler.dataimport;
import static org.apache.solr.handler.dataimport.DataImportHandlerException.SEVERE;
import static org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow;
import static org.apache.solr.handler.dataimport.XPathEntityProcessor.URL;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -77,6 +78,7 @@ public class PlainTextEntityProcessor extends EntityProcessorBase {
Map<String, Object> row = new HashMap<String, Object>();
row.put(PLAIN_TEXT, sw.toString());
ended = true;
IOUtils.closeQuietly(r);
return row;
}