mirror of https://github.com/apache/lucene.git
SOLR-2912 -- Fixed File descriptor leak in ShowFileRequestHandler
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1205774 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1ba08eda03
commit
44fc56dc92
|
@ -383,6 +383,10 @@ New Features
|
||||||
* SOLR-1565: StreamingUpdateSolrServer supports RequestWriter API and therefore, javabin update
|
* SOLR-1565: StreamingUpdateSolrServer supports RequestWriter API and therefore, javabin update
|
||||||
format (shalin)
|
format (shalin)
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
----------------------
|
||||||
|
* SOLR-2912: Fixed File descriptor leak in ShowFileRequestHandler (Michael Ryan, shalin)
|
||||||
|
|
||||||
================== 3.5.0 ==================
|
================== 3.5.0 ==================
|
||||||
|
|
||||||
New Features
|
New Features
|
||||||
|
|
|
@ -206,11 +206,14 @@ public class ShowFileRequestHandler extends RequestHandlerBase
|
||||||
return ""; // ignore it...
|
return ""; // ignore it...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
InputStream input = null;
|
||||||
try {
|
try {
|
||||||
InputStream input = core.getResourceLoader().openResource(path);
|
input = core.getResourceLoader().openResource(path);
|
||||||
return IOUtils.toString( input, "UTF-8" );
|
return IOUtils.toString( input, "UTF-8" );
|
||||||
|
} catch( Exception ex ) {
|
||||||
|
} finally {
|
||||||
|
IOUtils.closeQuietly(input);
|
||||||
}
|
}
|
||||||
catch( Exception ex ) {} // ignore it
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue