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:01 UTC

[camel] 16/23: CAMEL-15520: fixed deprecations in camel-quickfix

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 5b486553ec7870591e6129bc2c9f423c8bb8dc12
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Mar 7 12:15:07 2022 +0100

    CAMEL-15520: fixed deprecations in camel-quickfix
---
 .../java/org/apache/camel/component/quickfixj/QuickfixjProducer.java  | 4 ++--
 .../org/apache/camel/component/quickfixj/QuickfixjProducerTest.java   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java
index 8738792..485bbfc 100644
--- a/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java
+++ b/components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjProducer.java
@@ -92,8 +92,8 @@ public class QuickfixjProducer extends DefaultProducer {
 
         if (callable != null) {
             Message reply = callable.call();
-            exchange.getOut().getHeaders().putAll(camelMessage.getHeaders());
-            exchange.getOut().setBody(reply);
+            exchange.getMessage().getHeaders().putAll(camelMessage.getHeaders());
+            exchange.getMessage().setBody(reply);
         }
     }
 
diff --git a/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjProducerTest.java b/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjProducerTest.java
index ff084b6..f1cfa3a 100644
--- a/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjProducerTest.java
+++ b/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjProducerTest.java
@@ -125,7 +125,7 @@ public class QuickfixjProducerTest {
                 1000L, Long.class)).thenReturn(5000L);
 
         org.apache.camel.Message mockOutboundCamelMessage = Mockito.mock(org.apache.camel.Message.class);
-        Mockito.when(mockExchange.getOut()).thenReturn(mockOutboundCamelMessage);
+        Mockito.when(mockExchange.getMessage()).thenReturn(mockOutboundCamelMessage);
 
         final Message outboundFixMessage = new Email();
         outboundFixMessage.getHeader().setString(SenderCompID.FIELD, "TARGET");