This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-24109 in repository https://gitbox.apache.org/repos/asf/camel.git
commit afe8abc55da8c1002604d362e39f216adb1ed5cd Author: Claus Ibsen <[email protected]> AuthorDate: Thu Jul 16 12:01:30 2026 +0200 CAMEL-24109: camel-xslt-saxon - remove duplicated doInit/doStart lifecycle that caused stylesheet to load twice Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../component/xslt/saxon/XsltSaxonEndpoint.java | 26 ---------------------- 1 file changed, 26 deletions(-) diff --git a/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java b/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java index 87b3fed7a42a..4a3864d694fc 100644 --- a/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java +++ b/components/camel-xslt-saxon/src/main/java/org/apache/camel/component/xslt/saxon/XsltSaxonEndpoint.java @@ -53,7 +53,6 @@ import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.support.EndpointHelper; -import org.apache.camel.support.ResourceHelper; import org.apache.camel.support.builder.ExpressionBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -187,31 +186,6 @@ public class XsltSaxonEndpoint extends XsltEndpoint { this.useJsonBody = useJsonBody; } - @Override - protected void doInit() throws Exception { - super.doInit(); - - // the processor is the xslt builder - setXslt(createXsltBuilder()); - - // must load resource first which sets a template and do a stylesheet compilation to catch errors early - // load resource from classpath otherwise load in doStart() - if (isContentCache() && ResourceHelper.isClasspathUri(getResourceUri())) { - loadResource(getResourceUri(), getXslt()); - } - - setProcessor(getXslt()); - } - - @Override - protected void doStart() throws Exception { - super.doStart(); - - if (isContentCache() && !ResourceHelper.isClasspathUri(getResourceUri())) { - loadResource(getResourceUri(), getXslt()); - } - } - @Override protected XsltSaxonBuilder createXsltBuilder() throws Exception { final CamelContext ctx = getCamelContext();
