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 2022/03/07 12:55:02 UTC

[camel] 17/23: CAMEL-15520: fixed deprecations in camel-mvel

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 0038347ab4d15d80d1ab66b0059d04c161feadce
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Mar 7 12:24:47 2022 +0100

    CAMEL-15520: fixed deprecations in camel-mvel
---
 .../src/main/java/org/apache/camel/component/mvel/MvelEndpoint.java | 2 +-
 .../test/java/org/apache/camel/language/mvel/MvelComponentTest.java | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/camel-mvel/src/main/java/org/apache/camel/component/mvel/MvelEndpoint.java b/components/camel-mvel/src/main/java/org/apache/camel/component/mvel/MvelEndpoint.java
index 6703adf..50dab51 100644
--- a/components/camel-mvel/src/main/java/org/apache/camel/component/mvel/MvelEndpoint.java
+++ b/components/camel-mvel/src/main/java/org/apache/camel/component/mvel/MvelEndpoint.java
@@ -145,7 +145,7 @@ public class MvelEndpoint extends ResourceEndpoint {
         Object result = TemplateRuntime.execute(compiled, mvelContext, variableMap);
 
         // now lets output the results to the exchange
-        Message out = exchange.getOut();
+        Message out = exchange.getMessage();
         out.setBody(result.toString());
         out.setHeaders(exchange.getIn().getHeaders());
     }
diff --git a/components/camel-mvel/src/test/java/org/apache/camel/language/mvel/MvelComponentTest.java b/components/camel-mvel/src/test/java/org/apache/camel/language/mvel/MvelComponentTest.java
index 26ab431..61773a2 100644
--- a/components/camel-mvel/src/test/java/org/apache/camel/language/mvel/MvelComponentTest.java
+++ b/components/camel-mvel/src/test/java/org/apache/camel/language/mvel/MvelComponentTest.java
@@ -38,7 +38,7 @@ public class MvelComponentTest extends CamelTestSupport {
             }
         });
 
-        assertEquals("{ \"text\": \"The result is 14\" }", exchange.getOut().getBody());
+        assertEquals("{ \"text\": \"The result is 14\" }", exchange.getMessage().getBody());
     }
 
     @Test
@@ -52,7 +52,7 @@ public class MvelComponentTest extends CamelTestSupport {
             }
         });
 
-        assertEquals("{ \"text\": \"The result is 21\" }", exchange.getOut().getBody());
+        assertEquals("{ \"text\": \"The result is 21\" }", exchange.getMessage().getBody());
     }
 
     @Test
@@ -66,7 +66,7 @@ public class MvelComponentTest extends CamelTestSupport {
             }
         });
 
-        assertEquals("{ \"text\": \"The result is 28\" }", exchange.getOut().getBody());
+        assertEquals("{ \"text\": \"The result is 28\" }", exchange.getMessage().getBody());
     }
 
     @Override