From 9af5a67d6ceb479a04387bd43e920658b4ece03f Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 29 Nov 2011 08:56:25 -0500 Subject: [PATCH] fix api doc note about setUseSystemProperties doing nothing This is a mess, I earlier added a note to the README about needing to fix it. --- .../com/typesafe/config/ConfigFactory.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/config/src/main/java/com/typesafe/config/ConfigFactory.java b/config/src/main/java/com/typesafe/config/ConfigFactory.java index 36ad5c54..e94112a2 100644 --- a/config/src/main/java/com/typesafe/config/ConfigFactory.java +++ b/config/src/main/java/com/typesafe/config/ConfigFactory.java @@ -57,16 +57,17 @@ public final class ConfigFactory { /** * Like {@link #load(String)} but allows you to specify parse and resolve * options. - * *

* To be aware of: using * {@link ConfigResolveOptions#setUseSystemProperties(boolean) - * setUseSystemProperties(false)} with this method has no meaningful effect, + * setUseSystemProperties(false)} with this method has little effect, * because the system properties are merged into the config as overrides * anyway. setUseSystemProperties affects whether to fall back * to system properties when they are not found in the config, but with - * load(), they will be in the config. - * + * load(), they will be in the config. There is one situation + * where setUseSystemProperties(false) comes into play, which + * is that files included into another file may find the system property + * fallbacks but not the overrides. * @param resourceBasename * the classpath resource name with optional extension * @param parseOptions @@ -99,16 +100,18 @@ public final class ConfigFactory { /** * Like {@link #load(Config)} but allows you to specify * {@link ConfigResolveOptions}. - * *

* To be aware of: using * {@link ConfigResolveOptions#setUseSystemProperties(boolean) - * setUseSystemProperties(false)} with this method has no meaningful effect, + * setUseSystemProperties(false)} with this method has little effect, * because the system properties are merged into the config as overrides * anyway. setUseSystemProperties affects whether to fall back * to system properties when they are not found in the config, but with - * load(), they will be in the config. - * + * load(), they will be in the config. There is one situation + * where setUseSystemProperties(false) comes into play, which + * is that files included into another file may find the system property + * fallbacks but not the overrides. + * * @param config * the application's portion of the configuration * @param resolveOptions