[ 
https://issues.apache.org/jira/browse/CAMEL-12115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16315873#comment-16315873
 ] 

ASF GitHub Bot commented on CAMEL-12115:
----------------------------------------

lburgazzoli commented on a change in pull request #2166:  
"CAMEL-12115:Camel-Consul: Upgrade to 1.0.0 consul client"
URL: https://github.com/apache/camel/pull/2166#discussion_r160091415
 
 

 ##########
 File path: 
components/camel-consul/src/main/java/org/apache/camel/component/consul/endpoint/ConsulEventConsumer.java
 ##########
 @@ -98,8 +99,8 @@ private void onEvent(Event event) {
             if (event.getTagFilter().isPresent()) {
                 message.setHeader(ConsulConstants.CONSUL_TAG_FILTER, 
event.getTagFilter().get());
             }
-
-            message.setBody(event.getPayload().orNull());
+            
+            message.setBody(Optional.ofNullable(event.getPayload()));
 
 
 Review comment:
   Doesn't looks similar, if I'm not mistaking this
   
       event.getPayload().orNull()
   
   returns the event payload or null, whereas
   
       message.setBody(Optional.ofNullable(event.getPayload()));
   
   creates an eventually empty Optional
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Camel-Consul: Upgrade to 1.0.0 consul client
> --------------------------------------------
>
>                 Key: CAMEL-12115
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12115
>             Project: Camel
>          Issue Type: Task
>          Components: camel-consul
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>             Fix For: 2.21.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to