Skip to content

Commit bb0775f

Browse files
committed
Updated example
1 parent 62d9a4c commit bb0775f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

config/src/main/java/io/scalecube/config/source/SystemPropertiesConfigSource.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
public final class SystemPropertiesConfigSource implements ConfigSource {
1010
private Map<String, ConfigProperty> loadedConfig;
1111

12-
private final ConfigSource overrideConfigSource;
12+
private final ConfigSource configSource;
1313

1414
public SystemPropertiesConfigSource() {
1515
this(null);
1616
}
1717

18-
public SystemPropertiesConfigSource(ConfigSource overrideConfigSource) {
19-
this.overrideConfigSource = overrideConfigSource;
18+
public SystemPropertiesConfigSource(ConfigSource configSource) {
19+
this.configSource = configSource;
2020
}
2121

2222
@Override
@@ -26,8 +26,8 @@ public Map<String, ConfigProperty> loadConfig() {
2626
}
2727

2828
Properties properties = System.getProperties();
29-
if (overrideConfigSource != null) {
30-
properties = overrideSystemProperties(overrideConfigSource.loadConfig(), properties);
29+
if (configSource != null) {
30+
properties = mergeSystemProperties(configSource.loadConfig(), properties);
3131
}
3232

3333
Map<String, ConfigProperty> result = new TreeMap<>();
@@ -42,7 +42,7 @@ public Map<String, ConfigProperty> loadConfig() {
4242
return loadedConfig = result;
4343
}
4444

45-
private static Properties overrideSystemProperties(
45+
private static Properties mergeSystemProperties(
4646
Map<String, ConfigProperty> overrideConfig, Properties properties) {
4747

4848
final Properties finalProperties = new Properties();

0 commit comments

Comments
 (0)