This is an automated email from the ASF dual-hosted git repository. orpiske 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 0f7778ead53 fix body comparison - model is the parent/super type of body 0f7778ead53 is described below commit 0f7778ead53a07d6ef7f8590ab3be67cfa9abbd2 Author: Shantanu Kumar <kumar.shant...@gmail.com> AuthorDate: Mon Mar 17 13:39:25 2025 +0530 fix body comparison - model is the parent/super type of body --- .../apache/camel/component/servicenow/AbstractServiceNowProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java b/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java index 3e28c0eb6ed..27ba88f6935 100644 --- a/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java +++ b/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java @@ -151,7 +151,7 @@ public abstract class AbstractServiceNowProcessor implements Processor { protected AbstractServiceNowProcessor validateBody(Object body, Class<?> model) { ObjectHelper.notNull(body, "body"); - if (!body.getClass().isAssignableFrom(model)) { + if (!model.isAssignableFrom(body.getClass())) { throw new IllegalArgumentException( "Body is not compatible with model (body=" + body.getClass() + ", model=" + model); }