jamesfredley commented on code in PR #16547:
URL: https://github.com/apache/grails-core/pull/16547#discussion_r4214605124
##########
grails-core/src/main/groovy/org/grails/config/yaml/YamlPropertySourceLoader.java:
##########
@@ -58,9 +61,17 @@ public List<PropertySource<?>> load(String name, Resource
resource) throws IOExc
public List<PropertySource<?>> load(String name, Resource resource,
List<String> filteredKeys) throws IOException {
setResources(resource);
+ // Select source documents once; merging resolved configuration must
not re-evaluate JVM profiles.
+ final List<String> activeProfiles = Arrays.asList(
+
StringUtils.tokenizeToStringArray(System.getProperty("spring.profiles.active",
""), ","));
setDocumentMatchers((DocumentMatcher) properties -> {
- final String profile = properties.getProperty("spring.profiles");
- return profile == null ||
profile.equalsIgnoreCase(System.getProperty("spring.profiles.active")) ?
MatchStatus.FOUND : MatchStatus.NOT_FOUND;
+ final String profile =
properties.getProperty("spring.config.activate.on-profile", "").trim();
Review Comment:
Rechecked a643247dd2. The loader collects indexed sequence entries and
evaluates them as alternative selectors. YamlSpringProfileSpec and
ExternalConfigSpec fail if a sequence is ignored. Oracle and Codex both came
back clean on this head.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]