Class SystemSettingUtils
java.lang.Object
software.amazon.awssdk.utils.internal.SystemSettingUtils
A set of static utility methods for shared code in
SystemSetting
.-
Method Summary
Modifier and TypeMethodDescriptionAttempt to load a key from the environment variables.resolveEnvironmentVariable
(SystemSetting setting) Attempt to load this setting from the environment variables.resolveNonDefaultSetting
(SystemSetting setting) Resolve the value of this system setting, loading it from the System by checking: The system properties. The environment variables.resolveSetting
(SystemSetting setting) Resolve the value of this system setting, loading it from the System by checking: The system properties. The environment variables. The default value.static Boolean
safeStringToBoolean
(SystemSetting setting, String value) Convert a string to boolean safely (as opposed to the less strictBoolean.parseBoolean(String)
).
-
Method Details
-
resolveSetting
Resolve the value of this system setting, loading it from the System by checking:- The system properties.
- The environment variables.
- The default value.
-
resolveNonDefaultSetting
Resolve the value of this system setting, loading it from the System by checking:- The system properties.
- The environment variables.
This is similar to
resolveSetting(SystemSetting)
but does not fall back to the default value if neither the environment variable or system property value are present. -
resolveEnvironmentVariable
Attempt to load this setting from the environment variables. -
resolveEnvironmentVariable
Attempt to load a key from the environment variables. -
safeStringToBoolean
Convert a string to boolean safely (as opposed to the less strictBoolean.parseBoolean(String)
). If a customer specifies a boolean value it should be "true" or "false" (case insensitive) or an exception will be thrown.
-