This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 87b124b4627 CAMEL-19778: camel-jbang - Add DSL transform command 87b124b4627 is described below commit 87b124b4627e2bd207095aecd1539b8f8dfb60e0 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Aug 23 22:38:49 2023 +0200 CAMEL-19778: camel-jbang - Add DSL transform command --- .../src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java | 6 +++++- .../main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java | 6 +++++- .../src/main/java/org/apache/camel/yaml/LwModelToYAMLDumper.java | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java b/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java index 91bb5d9fef4..39c7c513250 100644 --- a/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java +++ b/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java @@ -320,7 +320,11 @@ public class LwModelToXMLDumper implements ModelToXMLDumper { } private void doWriteRegistryBeanDefinition(RegistryBeanDefinition b) { - buffer.write(String.format(" <bean name=\"%s\" type=\"%s\">%n", b.getName(), b.getType())); + String type = b.getType(); + if (type.startsWith("#class:")) { + type = type.substring(7); + } + buffer.write(String.format(" <bean name=\"%s\" type=\"%s\">%n", b.getName(), type)); if (b.getProperties() != null && !b.getProperties().isEmpty()) { buffer.write(String.format(" <properties>%n")); for (Map.Entry<String, Object> entry : b.getProperties().entrySet()) { diff --git a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java index 0d4ca70f8c7..896a5e9ce9c 100644 --- a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java +++ b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java @@ -333,7 +333,11 @@ public class JaxbModelToXMLDumper implements ModelToXMLDumper { } private void doWriteRegistryBeanDefinition(RegistryBeanDefinition b) { - buffer.write(String.format(" <bean name=\"%s\" type=\"%s\">%n", b.getName(), b.getType())); + String type = b.getType(); + if (type.startsWith("#class:")) { + type = type.substring(7); + } + buffer.write(String.format(" <bean name=\"%s\" type=\"%s\">%n", b.getName(), type)); if (b.getProperties() != null && !b.getProperties().isEmpty()) { buffer.write(String.format(" <properties>%n")); for (Map.Entry<String, Object> entry : b.getProperties().entrySet()) { diff --git a/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/LwModelToYAMLDumper.java b/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/LwModelToYAMLDumper.java index ed49ca2fceb..d07d18826d2 100644 --- a/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/LwModelToYAMLDumper.java +++ b/core/camel-yaml-io/src/main/java/org/apache/camel/yaml/LwModelToYAMLDumper.java @@ -308,8 +308,12 @@ public class LwModelToYAMLDumper implements ModelToYAMLDumper { } private void doWriteRegistryBeanDefinition(RegistryBeanDefinition b) { + String type = b.getType(); + if (type.startsWith("#class:")) { + type = type.substring(7); + } buffer.write(String.format(" - name: %s%n", b.getName())); - buffer.write(String.format(" type: \"%s\"%n", b.getType())); + buffer.write(String.format(" type: \"%s\"%n", type)); if (b.getProperties() != null && !b.getProperties().isEmpty()) { buffer.write(String.format(" properties:%n")); for (Map.Entry<String, Object> entry : b.getProperties().entrySet()) {