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


##########
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:
   I went ahead and used try-with-resources 
(b6487869eec05cad5478fea05fc8bf224ccb8129) where possible (it's not possible in 
contexts where the InputStream is opened in less straightforward ways).
   
   @risdenk in cd4923ff78ae43d80b2b43029ff282e5322a8e13 I also addressed the 
case you identified in IndexSchemaFactory, and followed up the stack trace to 
address a similar issue in ManagedIndexSchemaFactory.
   
   As a consequence of the ManagedIndexSchemaFactory change, this PR's a bit 
easier to review ignoring whitespace: 
https://github.com/apache/solr/pull/1302/files?w=1



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to