Skip to content

Commit 756ef8c

Browse files
committed
Update current sources while reading late sources
Without this, a custom `ConfigSourceFactory` is not able to access properties defined in files referenced in `smallrye.config.locations`.
1 parent ae5cca6 commit 756ef8c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

implementation/src/main/java/io/smallrye/config/SmallRyeConfig.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,12 @@ private static List<ConfigSourceWithPriority> mapLateSources(
20072007
countSourcesFromLocations = countSourcesFromLocations + configSources.size();
20082008
}
20092009

2010+
List<ConfigSourceWithPriority> updatedCurrentSources = mapSources(profileContext.getConfigSources(),
2011+
configSources);
2012+
profileContext.getConfigSources().clear();
2013+
profileContext.getConfigSources()
2014+
.addAll(updatedCurrentSources.stream().map(ConfigSourceWithPriority::getSource).toList());
2015+
20102016
lateSources.addAll(configSources);
20112017
}
20122018
}

0 commit comments

Comments
 (0)