You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/02/14 12:54:08 UTC

[camel] 23/23: CAMEL-15105: remove unnecessary adapt to Exchange

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

commit a91ba7e68ed3d11638b45e3570a7adc899dd55c3
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Feb 14 09:06:37 2023 +0100

    CAMEL-15105: remove unnecessary adapt to Exchange
---
 .../main/java/org/apache/camel/support/builder/ExpressionBuilder.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
index 96de5b5e1c4..73b4b20cea3 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
@@ -837,7 +837,7 @@ public class ExpressionBuilder {
             @Override
             public Object evaluate(Exchange exchange) {
                 if (enabled) {
-                    UnitOfWork uow = exchange.adapt(Exchange.class).getUnitOfWork();
+                    UnitOfWork uow = exchange.getUnitOfWork();
                     if (uow != null) {
                         Message msg = uow.getOriginalInMessage();
                         if (msg != null) {