dsmiley commented on code in PR #962:
URL: https://github.com/apache/solr/pull/962#discussion_r958585230
##########
solr/core/src/java/org/apache/solr/core/SolrConfig.java:
##########
@@ -413,7 +413,7 @@ private void readXml(
Map<String, IndexSchemaFactory.VersionedConfig> configCache,
ResourceProvider rp)
throws IOException {
- XmlConfigFile xml = new XmlConfigFile(loader, rp, name, null, "/config/",
null);
+ XmlConfigFile xml = new XmlConfigFile(loader, name, null, "/config/",
null);
Review Comment:
It's suspicious you aren't passing the inputStream (from `rp`) here
##########
solr/core/src/java/org/apache/solr/core/XmlConfigFile.java:
##########
@@ -125,59 +82,30 @@ public XmlConfigFile(
*/
public XmlConfigFile(
SolrResourceLoader loader,
- Function<String, InputStream> fileSupplier,
String name,
InputSource is,
String prefix,
Properties substituteProps)
throws IOException {
- if (null == loader) throw new NullPointerException("loader");
+ Objects.requireNonNull(loader);
this.loader = loader;
Review Comment:
The cool thing about Objects.requireNonNull is that it *returns* it's input
and thus you can combine it into an existing line of code to populate a field.
--
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]