You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2023/01/18 22:42:27 UTC

[GitHub] [solr] dsmiley commented on a diff in pull request #1302: SOLR-16628: Ensure that InputStreams are closed after Xml parsing

dsmiley commented on code in PR #1302:
URL: https://github.com/apache/solr/pull/1302#discussion_r1080639405


##########
solr/core/src/java/org/apache/solr/core/SolrConfig.java:
##########
@@ -393,14 +393,22 @@ private SolrConfig(
   }
 
   private IndexSchemaFactory.VersionedConfig readXml(SolrResourceLoader loader, String name) {
+    InputStream in = null;
     try {
-      ResourceProvider rp = new ResourceProvider(loader, name);
+      in = loader.openResource(name);

Review Comment:
   Can we use try-with-resources pattern here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org