This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch 3.40.x in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 0a261f620601e3aaae1c4108ebcb2ce703f4e005 Author: Lukas Lowinger <[email protected]> AuthorDate: Fri Oct 23 10:23:31 2026 +0200 Fix SSL exception detection in splunk-hec test --- .../quarkus/component/splunk/hec/it/SplunkHecResource.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java b/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java index e8702014a8..560bbbe246 100644 --- a/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java +++ b/integration-tests/splunk-hec/src/main/java/org/apache/camel/quarkus/component/splunk/hec/it/SplunkHecResource.java @@ -78,13 +78,24 @@ public class SplunkHecResource { .entity(producer.requestBodyAndHeader(url, data, SplunkHECConstants.INDEX_TIME, indexTime, String.class)) .build(); } catch (Exception e) { - if (e.getCause() instanceof SSLException) { + if (containsSslException(e)) { return Response.status(500).entity("ssl exception").build(); } throw new RuntimeException(e); } } + private boolean containsSslException(Throwable e) { + Throwable current = e; + while (current != null) { + if (current instanceof SSLException) { + return true; + } + current = current.getCause(); + } + return false; + } + @Named("sslContextParameters") public SSLContextParameters createServerSSLContextParameters() { return createServerSSLContextParameters("target/certs/splunk-hec-keystore.p12");
