in src/main/java/org/apache/sling/feature/cpconverter/features/DefaultFeaturesManager.java [398:426]
private void adjustConfigurationProperties(@NotNull Configuration configuration,
@NotNull Dictionary<String, Object> configurationProperties) {
Enumeration<String> keys = configurationProperties.keys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
Object value = configurationProperties.get(key);
if (value instanceof Collection) {
value = ((Collection<?>) value).toArray();
}
configuration.getProperties().put(key, value);
}
// remove internal properties (these are ignored anyway)
configuration.getProperties().remove(Constants.SERVICE_PID);
configuration.getProperties().remove("service.bundleLocation");
configuration.getProperties().remove("service.factoryPid");
// set origins
if (!this.packageIds.isEmpty()) {
final List<String> origins = new ArrayList<>();
final Object val = configuration.getProperties().get(CONFIGURATION_ORIGINS);
if (val != null) {
origins.addAll(Arrays.asList(val.toString().split(",")));
}
origins.add(String.join("|", this.packageIds));
configuration.getProperties().put(CONFIGURATION_ORIGINS, String.join(",", origins));
}
}