Skip to content

Commit 9a39eda

Browse files
committed
javadoc fixes
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 1640d8a commit 9a39eda

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/loader/ConfigLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public ConfigLoader(
150150

151151
/**
152152
* Returns a {@link Consumer} that applies every operator-level property found in the {@link
153-
* ConfigProvider} to the given {@link ConfigurationServiceOverrider}. Returns {@code null} when
153+
* ConfigProvider} to the given {@link ConfigurationServiceOverrider}. Returns no-op consumer when
154154
* no binding has a matching value, preserving the previous behavior.
155155
*/
156156
public Consumer<ConfigurationServiceOverrider> applyConfigs() {

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/loader/DefaultConfigProvider.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@
1919
import java.util.Optional;
2020
import java.util.function.Function;
2121

22+
/**
23+
* A {@link ConfigProvider} that resolves configuration values from environment variables and Java
24+
* system properties.
25+
*
26+
* <p>For a given key, lookup proceeds as follows:
27+
*
28+
* <ol>
29+
* <li>The key is converted to an environment variable name by replacing dots and hyphens with
30+
* underscores and converting to upper case (e.g. {@code josdk.cache-sync.timeout} → {@code
31+
* JOSDK_CACHE_SYNC_TIMEOUT}). If an environment variable with that name is set, its value is
32+
* used.
33+
* <li>If no matching environment variable is found, the key is looked up as a Java system
34+
* property (via {@link System#getProperty(String)}) using the original key name.
35+
* </ol>
36+
*
37+
* <p>Environment variables take precedence over system properties when both are set. Supported
38+
* value types are: {@link String}, {@link Boolean}, {@link Integer}, {@link Long}, {@link Double},
39+
* and {@link java.time.Duration} (ISO-8601 format, e.g. {@code PT30S}).
40+
*/
2241
public class DefaultConfigProvider implements ConfigProvider {
2342

2443
private final Function<String, String> envLookup;

0 commit comments

Comments
 (0)