This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.0.x by this push:
new 1426f0e6021 CAMEL-20013: AdviceWith should have model dumper as
optional in case its not on classpath.
1426f0e6021 is described below
commit 1426f0e60215fcfb1741753e1fe8c47a30250e77
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Oct 18 16:18:18 2023 +0200
CAMEL-20013: AdviceWith should have model dumper as optional in case its
not on classpath.
---
.../src/main/java/org/apache/camel/builder/AdviceWith.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/builder/AdviceWith.java
b/core/camel-core-model/src/main/java/org/apache/camel/builder/AdviceWith.java
index 8ec466c11e1..71937375f4f 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/builder/AdviceWith.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/builder/AdviceWith.java
@@ -239,9 +239,9 @@ public final class AdviceWith {
}
String beforeAsXml = null;
- final ModelToXMLDumper modelToXMLDumper =
PluginHelper.getModelToXMLDumper(ecc);
if (logRoutesAsXml && LOG.isInfoEnabled()) {
try {
+ ModelToXMLDumper modelToXMLDumper =
PluginHelper.getModelToXMLDumper(ecc);
beforeAsXml = modelToXMLDumper.dumpModelAsXml(camelContext,
definition);
} catch (Throwable e) {
// ignore, it may be due jaxb is not on classpath etc
@@ -278,6 +278,7 @@ public final class AdviceWith {
if (beforeAsXml != null && logRoutesAsXml && LOG.isInfoEnabled()) {
try {
+ ModelToXMLDumper modelToXMLDumper =
PluginHelper.getModelToXMLDumper(ecc);
String afterAsXml =
modelToXMLDumper.dumpModelAsXml(camelContext, merged);
LOG.info("Adviced route before/after as XML:\n{}\n\n{}",
beforeAsXml, afterAsXml);
} catch (Throwable e) {