[camel-main-support] Reordering props should not be required anymore
@@ -76,17 +76,9 @@ public class CamelMainSupport {
camelMain.addMainListener(new CamelMainFinishedListener());
camelMain.configure().setAutoConfigurationLogSummary(false);
- // reordering properties to place the one starting with "#class:" first
- LinkedHashMap<String, String> orderedProps = new LinkedHashMap<>();
- props.keySet().stream()
- .filter(k -> props.get(k).startsWith("#class:"))
- .forEach(k -> orderedProps.put(k, props.get(k)));
- props.keySet().stream()
- .filter(k -> !props.get(k).startsWith("#class:"))
- .forEach(k -> orderedProps.put(k, props.get(k)));
Properties camelProperties = new OrderedProperties();
- camelProperties.putAll(orderedProps);
+ camelProperties.putAll(props);
LOG.info("Setting initial properties in Camel context: [{}]", camelProperties);
this.camel.getPropertiesComponent().setInitialProperties(camelProperties);
