ppkarwasz commented on code in PR #3921:
URL: https://github.com/apache/logging-log4j2/pull/3921#discussion_r2424979104
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java:
##########
@@ -333,6 +335,71 @@ public Configuration getConfiguration(
return getConfiguration(loggerContext, name, configLocation);
}
+ /**
+ * {@return a {@link Configuration} created using provided configuration
location {@link URI}s}
+ * If the provided list of {@code URI}s is null or empty, {@code
getConfiguration(loggerContext, name, (URI) null)} will be returned.
Review Comment:
Should we explain more explicitly the behavior of an empty list?
```suggestion
* <p>If the provided list of {@code URI}s is empty, the configuration
factory
* attempts to load an implementation-dependent set of default locations.
* If no configuration can be found, a {@link ConfigurationException} is
thrown.</p>
```
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java:
##########
@@ -333,6 +335,71 @@ public Configuration getConfiguration(
return getConfiguration(loggerContext, name, configLocation);
}
+ /**
+ * {@return a {@link Configuration} created using provided configuration
location {@link URI}s}
+ * If the provided list of {@code URI}s is null or empty, {@code
getConfiguration(loggerContext, name, (URI) null)} will be returned.
+ *
+ * @param loggerContext a logger context, may be null
+ * @param name a configuration name, may be null
+ * @param configLocations configuration location {@code URI}s, may be null
or empty
Review Comment:
*Nit*: I’d prefer not to allow `null` for a new API and instead require
callers to pass an empty list.
--
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]