Skip to content

Commit

Permalink
use correct ParseOptions object
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaldino committed Sep 24, 2020
1 parent 2d43727 commit 4be9b6d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions config/src/main/java/com/typesafe/config/ConfigFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ public static Config load(String resourceBasename) {
/**
* Like {@link #load(String)} but uses the supplied class loader instead of
* the current thread's context class loader.
*
*
* <p>
* To load a standalone resource (without the default reference and default
* overrides), use {@link #parseResourcesAnySyntax(ClassLoader, String)}
* rather than this method. To load only the reference config use
* {@link #defaultReference(ClassLoader)} and to load only the overrides use
* {@link #defaultOverrides(ClassLoader)}.
*
*
* @param loader class loader to look for resources in
* @param resourceBasename basename (no .conf/.json/.properties suffix)
* @return configuration for an application relative to given class loader
Expand Down Expand Up @@ -333,27 +333,27 @@ public static Config load(ConfigParseOptions parseOptions, final ConfigResolveOp
* by merging all resources "reference.conf" found on the classpath and
* overriding the result with system properties. The returned reference
* configuration will already have substitutions resolved.
*
*
* <p>
* Libraries and frameworks should ship with a "reference.conf" in their
* jar.
*
*
* <p>
* The reference config must be looked up in the class loader that contains
* the libraries that you want to use with this config, so the
* "reference.conf" for each library can be found. Use
* {@link #defaultReference(ClassLoader)} if the context class loader is not
* suitable.
*
*
* <p>
* The {@link #load()} methods merge this configuration for you
* automatically.
*
*
* <p>
* Future versions may look for reference configuration in more places. It
* is not guaranteed that this method <em>only</em> looks at
* "reference.conf".
*
*
* @return the default reference config for context class loader
*/
public static Config defaultReference() {
Expand Down Expand Up @@ -613,7 +613,7 @@ public static Config systemProperties() {
* used to override configuration keys.
* Environment variables taken in considerations are starting with
* {@code CONFIG_FORCE_}
*
*
* <p>
* Environment variables are mangled in the following way after stripping the prefix "CONFIG_FORCE_":
* <table border="1">
Expand All @@ -634,11 +634,11 @@ public static Config systemProperties() {
* <td>_ [underscore]</td>
* </tr>
* </table>
*
*
* <p>
* A variable like: {@code CONFIG_FORCE_a_b__c___d}
* is translated to a config key: {@code a.b-c_d}
*
*
* <p>
* This method can return a global immutable singleton, so it's preferred
* over parsing system properties yourself.
Expand Down Expand Up @@ -1129,8 +1129,8 @@ 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();
final ConfigParseOptions withLoader = ensureClassLoader(parseOptions, "parseApplicationReplacement");
ClassLoader loader = withLoader.getClassLoader();

int specified = 0;

Expand Down

0 comments on commit 4be9b6d

Please sign in to comment.