This is an automated email from the ASF dual-hosted git repository. christophd pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 70984a67070320f7f2e26696ba14d8b3041422a6 Author: Christoph Deppisch <[email protected]> AuthorDate: Thu Oct 15 09:34:19 2026 +0200 CAMEL-25378: Fix validate() return type and doc inaccuracy - Fix WhenMessageValidationSpec.validate() to return the correct covariant type so .validate(...).then().respond() chains compile - Fix docs: unmatched exchanges pass through silently, not as failures Co-Authored-By: Claude Opus 4.6 <[email protected]> --- .../resources/org/apache/camel/catalog/docs/citrus-component.adoc | 6 +++--- .../camel-test-citrus/src/main/docs/citrus-component.adoc | 6 +++--- .../main/java/org/apache/camel/component/citrus/CitrusEndpoint.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/citrus-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/citrus-component.adoc index 6866e5868f1e..faf89bdbd5c5 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/citrus-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/citrus-component.adoc @@ -268,9 +268,9 @@ it replaces `validateAll()` for that exchange entirely (the two are never combin `validateAll()` spec acts as a fallback for exchanges that have no matching indexed spec. If an exchange arrives at an index with no matching indexed spec and no `validateAll()` fallback, -the endpoint records a failure. For the `validate` operation, the failure is collected and reported -when `assertIsSatisfied()` is called (similar to MockEndpoint). For the `receive` operation, the -failure is thrown immediately as an exception. +the exchange passes through without validation. No failure is recorded by the endpoint. +For the `validate` operation, unmatched exchanges are ignored silently. For the `receive` operation, +no simulated response is applied and the exchange continues unchanged. [source,java] ---- diff --git a/components/camel-test/camel-test-citrus/src/main/docs/citrus-component.adoc b/components/camel-test/camel-test-citrus/src/main/docs/citrus-component.adoc index 6866e5868f1e..faf89bdbd5c5 100644 --- a/components/camel-test/camel-test-citrus/src/main/docs/citrus-component.adoc +++ b/components/camel-test/camel-test-citrus/src/main/docs/citrus-component.adoc @@ -268,9 +268,9 @@ it replaces `validateAll()` for that exchange entirely (the two are never combin `validateAll()` spec acts as a fallback for exchanges that have no matching indexed spec. If an exchange arrives at an index with no matching indexed spec and no `validateAll()` fallback, -the endpoint records a failure. For the `validate` operation, the failure is collected and reported -when `assertIsSatisfied()` is called (similar to MockEndpoint). For the `receive` operation, the -failure is thrown immediately as an exception. +the exchange passes through without validation. No failure is recorded by the endpoint. +For the `validate` operation, unmatched exchanges are ignored silently. For the `receive` operation, +no simulated response is applied and the exchange continues unchanged. [source,java] ---- diff --git a/components/camel-test/camel-test-citrus/src/main/java/org/apache/camel/component/citrus/CitrusEndpoint.java b/components/camel-test/camel-test-citrus/src/main/java/org/apache/camel/component/citrus/CitrusEndpoint.java index 10ef50df6e32..71bb618e37b6 100644 --- a/components/camel-test/camel-test-citrus/src/main/java/org/apache/camel/component/citrus/CitrusEndpoint.java +++ b/components/camel-test/camel-test-citrus/src/main/java/org/apache/camel/component/citrus/CitrusEndpoint.java @@ -191,7 +191,7 @@ public class CitrusEndpoint extends MockEndpoint { } @Override - public MessageValidationSpec validate(ValidationContext.Builder<?, ?>... validationContexts) { + public WhenMessageValidationSpec validate(ValidationContext.Builder<?, ?>... validationContexts) { super.validate(validationContexts); return this; }
