This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch var
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/var by this push:
     new 46a081f9253 CAMEL-22018: camel-core - Exchange.getVariables should 
include message headers
46a081f9253 is described below

commit 46a081f92530af1e4a4e5f8ba981eb219c3a85d1
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Apr 24 21:28:52 2025 +0200

    CAMEL-22018: camel-core - Exchange.getVariables should include message 
headers
---
 .../src/main/java/org/apache/camel/support/ExchangeHelper.java          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java 
b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
index 106c1b14c03..c8fcc9e3f96 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
@@ -376,7 +376,7 @@ public final class ExchangeHelper {
             result.getProperties().putAll(source.getProperties());
         }
         if (source.hasVariables()) {
-            source.getVariables().forEach(result::setVariable);
+            result.getVariables().putAll(source.getVariables());
         }
 
         final ExchangeExtension sourceExtension = 
source.getExchangeExtension();

Reply via email to