You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/01/07 15:23:59 UTC
[camel] 06/06: CAMEL-14020 - Migrate deprecate getOut to getMessage
in tests, camel-aws-xray
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4b632dfb1572ad4e5c4cdfce7c646a701d5f8933
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 7 16:23:19 2020 +0100
CAMEL-14020 - Migrate deprecate getOut to getMessage in tests, camel-aws-xray
---
.../aws/xray/decorators/http/AbstractHttpSegmentDecorator.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/components/camel-aws-xray/src/main/java/org/apache/camel/component/aws/xray/decorators/http/AbstractHttpSegmentDecorator.java b/components/camel-aws-xray/src/main/java/org/apache/camel/component/aws/xray/decorators/http/AbstractHttpSegmentDecorator.java
index 91c58d3..c110c90 100644
--- a/components/camel-aws-xray/src/main/java/org/apache/camel/component/aws/xray/decorators/http/AbstractHttpSegmentDecorator.java
+++ b/components/camel-aws-xray/src/main/java/org/apache/camel/component/aws/xray/decorators/http/AbstractHttpSegmentDecorator.java
@@ -46,11 +46,9 @@ public abstract class AbstractHttpSegmentDecorator extends AbstractSegmentDecora
public void post(Entity segment, Exchange exchange, Endpoint endpoint) {
super.post(segment, exchange, endpoint);
- if (exchange.hasOut()) {
- Object responseCode = exchange.getOut().getHeader(Exchange.HTTP_RESPONSE_CODE);
- if (responseCode instanceof Integer) {
- segment.putMetadata("htt.response.code", responseCode);
- }
+ Object responseCode = exchange.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE);
+ if (responseCode instanceof Integer) {
+ segment.putMetadata("htt.response.code", responseCode);
}
}