mirror of https://github.com/apache/lucene.git
moved close() of InputStream to finally block
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@765030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a5a9be2d19
commit
a31c7a692f
|
@ -132,11 +132,16 @@ public class VelocityResponseWriter implements QueryResponseWriter {
|
|||
if( propFile == null )
|
||||
engine.init();
|
||||
else{
|
||||
InputStream is = resourceLoader.getResourceStream( propFile );
|
||||
Properties props = new Properties();
|
||||
props.load( is );
|
||||
is.close();
|
||||
engine.init( props );
|
||||
InputStream is = null;
|
||||
try{
|
||||
is = resourceLoader.getResourceStream( propFile );
|
||||
Properties props = new Properties();
|
||||
props.load( is );
|
||||
engine.init( props );
|
||||
}
|
||||
finally{
|
||||
if( is != null ) is.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( Exception e ){
|
||||
|
|
Loading…
Reference in New Issue