Skip to content

Commit

Permalink
use ensureClassLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaldino committed Sep 23, 2020
1 parent 83349ec commit f3baf1d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions config/src/main/java/com/typesafe/config/ConfigFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -1123,13 +1123,9 @@ public static java.util.Optional<Config> parseApplicationReplacement(ClassLoader
* 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,
Expand Down

0 comments on commit f3baf1d

Please sign in to comment.