in src/main/java/org/apache/sling/caconfig/impl/override/ConfigurationOverrideMultiplexerImpl.java [90:113]
public Map<String,Object> overrideProperties(@NotNull String contextPath, @NotNull String configName, @NotNull Map<String,Object> properties) {
if (allOverrides.size() == 0) {
return null;
}
boolean anyMatch = false;
Map<String,Object> overrideProperties = new HashMap<>(properties);
for (OverrideItem override : allOverrides) {
if (StringUtils.equals(configName, override.getConfigName()) && override.matchesPath(contextPath)) {
if (override.isAllProperties()) {
overrideProperties.clear();
}
overrideProperties.putAll(override.getProperties());
anyMatch = true;
}
}
if (anyMatch) {
return overrideProperties;
}
else {
return null;
}
}