lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1205775 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/backwards/src/test-framework/ lucene/backwards/src/test/ solr/ solr/CHANGES.txt solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java solr/solrj/
Date Thu, 24 Nov 2011 10:16:10 GMT
Author: shalin
Date: Thu Nov 24 10:16:09 2011
New Revision: 1205775

URL: http://svn.apache.org/viewvc?rev=1205775&view=rev
Log:
SOLR-2912 -- Fixed File descriptor leak in ShowFileRequestHandler

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/backwards/src/test/   (props changed)
    lucene/dev/branches/branch_3x/lucene/backwards/src/test-framework/   (props changed)
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/CHANGES.txt
    lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
    lucene/dev/branches/branch_3x/solr/solrj/   (props changed)

Modified: lucene/dev/branches/branch_3x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/CHANGES.txt?rev=1205775&r1=1205774&r2=1205775&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/solr/CHANGES.txt Thu Nov 24 10:16:09 2011
@@ -31,6 +31,10 @@ New Features
 * SOLR-1565: StreamingUpdateSolrServer supports RequestWriter API and therefore, javabin
update
   format (shalin)
 
+Bug Fixes
+----------------------
+* SOLR-2912: Fixed File descriptor leak in ShowFileRequestHandler (Michael Ryan, shalin)
+
 ==================  3.5.0  ==================
 Versions of Major Components
 ---------------------

Modified: lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java?rev=1205775&r1=1205774&r2=1205775&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
(original)
+++ lucene/dev/branches/branch_3x/solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
Thu Nov 24 10:16:09 2011
@@ -210,12 +210,16 @@ public class ShowFileRequestHandler exte
         return ""; // ignore it...
       }
     }
+    InputStream input = null;
     try {
       SolrCore core = SolrCore.getSolrCore();
-      InputStream input = core.getResourceLoader().openResource(path);
+      input = core.getResourceLoader().openResource(path);
       return IOUtils.toString( input, "UTF-8" );
     }
     catch( Exception ex ) {} // ignore it
+    finally {
+      IOUtils.closeQuietly(input);
+    }
     return "";
   }
 



Mime
View raw message