mirror of
https://github.com/lightbend/config.git
synced 2025-01-29 05:30:08 +08:00
use ensureClassLoader
This commit is contained in:
parent
83349ecbfa
commit
f3baf1dfba
@ -1123,13 +1123,9 @@ public final class ConfigFactory {
|
||||
* if none was specified.
|
||||
*/
|
||||
public static java.util.Optional<Config> parseApplicationReplacement(ConfigParseOptions parseOptions) {
|
||||
ensureClassLoader(parseOptions, "parseApplicationReplacement");
|
||||
ClassLoader loader = parseOptions.getClassLoader();
|
||||
|
||||
if (loader == null)
|
||||
throw new ConfigException.BugOrBroken(
|
||||
"ClassLoader should have been set here; bug in ConfigFactory. "
|
||||
+ "(You can probably work around this bug by passing in a class loader or calling currentThread().setContextClassLoader() though.)");
|
||||
|
||||
int specified = 0;
|
||||
|
||||
// override application.conf with config.file, config.resource,
|
||||
|
Loading…
Reference in New Issue
Block a user