in src/main/java/org/apache/sling/feature/cpconverter/features/DefaultFeaturesManager.java [310:331]
private boolean handleRepoinitAndMappings(String runMode, Configuration cfg, Dictionary<String, Object> configurationProperties, boolean enforceServiceMappingByPrincipal)
throws IOException, ConverterException {
if (REPOINIT_FACTORY_PID.equals(cfg.getFactoryPid())) {
final String[] scripts = Converters.standardConverter().convert(configurationProperties.get("scripts")).to(String[].class);
if (scripts != null && scripts.length > 0) {
getAclManager().addRepoinitExtention(cfg.getPid(), String.join(System.lineSeparator(), scripts), runMode, this);
}
checkReferences(configurationProperties, cfg.getPid());
return true;
} else if (REPOINIT_PID.equals(cfg.getPid())) {
checkReferences(configurationProperties, cfg.getPid());
return true;
} else if (cfg.getPid().startsWith(SERVICE_USER_MAPPING_PID)) {
String[] mappings = Converters.standardConverter().convert(configurationProperties.get("user.mapping")).to(String[].class);
List<String> newMappings = convertMappings(mappings, cfg.getPid(), enforceServiceMappingByPrincipal);
// replace 'user.mapping' property by the new mappings, which may have been refactored
if (!newMappings.isEmpty()) {
configurationProperties.put("user.mapping", newMappings.toArray(new String[0]));
}
}
return false;
}