[
https://issues.apache.org/jira/browse/CAMEL-15385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-15385:
--------------------------------
Fix Version/s: 3.5.0
> camel-main - Properties ordering should use #class: first
> ---------------------------------------------------------
>
> Key: CAMEL-15385
> URL: https://issues.apache.org/jira/browse/CAMEL-15385
> Project: Camel
> Issue Type: New Feature
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 3.5.0
>
>
> camel-kafka-connector does this
> {code}
> // 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)));
> {code}
> Seems like a good idea to make camel-main resolve the class first so any
> nested properties can be set on the created class.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)