You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/11/03 14:03:01 UTC

[incubator-eventmesh] branch master updated: fix CI error: protocol mesh message

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

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new 973f3b9e fix CI error: protocol mesh message
     new b06fb188 Merge pull request #2108 from horoc/fix-ci-error-protocol-message
973f3b9e is described below

commit 973f3b9e9b08eb17b6d723c2f108805b03cf51c4
Author: horoc <ho...@gmail.com>
AuthorDate: Thu Nov 3 20:03:15 2022 +0800

    fix CI error: protocol mesh message
---
 .../eventmesh/protocol/meshmessage/MeshMessageProtocolAdaptor.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/src/main/java/org/apache/eventmesh/protocol/meshmessage/MeshMessageProtocolAdaptor.java b/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/src/main/java/org/apache/eventmesh/protocol/meshmessage/MeshMessageProtocolAdaptor.java
index 5f48d201..2fa8c88d 100644
--- a/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/src/main/java/org/apache/eventmesh/protocol/meshmessage/MeshMessageProtocolAdaptor.java
+++ b/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/src/main/java/org/apache/eventmesh/protocol/meshmessage/MeshMessageProtocolAdaptor.java
@@ -46,6 +46,7 @@ import java.util.List;
 import java.util.Map;
 
 import io.cloudevents.CloudEvent;
+
 import com.google.common.base.Preconditions;
 
 public class MeshMessageProtocolAdaptor implements ProtocolAdaptor<ProtocolTransportObject> {
@@ -113,7 +114,9 @@ public class MeshMessageProtocolAdaptor implements ProtocolAdaptor<ProtocolTrans
     @Override
     public ProtocolTransportObject fromCloudEvent(CloudEvent cloudEvent) throws ProtocolHandleException {
         validateCloudEvent(cloudEvent);
-        String protocolDesc = cloudEvent.getExtension(Constants.PROTOCOL_DESC) == null ? null : cloudEvent.getExtension(Constants.PROTOCOL_DESC).toString();
+        String protocolDesc =
+            cloudEvent.getExtension(Constants.PROTOCOL_DESC) == null ? null :
+                cloudEvent.getExtension(Constants.PROTOCOL_DESC).toString();
 
         if (StringUtils.equals(MeshMessageProtocolConstant.PROTOCOL_DESC_HTTP, protocolDesc)) {
             HttpCommand httpCommand = new HttpCommand();
@@ -122,7 +125,7 @@ public class MeshMessageProtocolAdaptor implements ProtocolAdaptor<ProtocolTrans
 
                 @Override
                 public Map<String, Object> toMap() {
-                    if(cloudEvent.getData() == null){
+                    if (cloudEvent.getData() == null) {
                         return map;
                     }
                     map.put(MeshMessageProtocolConstant.PROTOCOL_KEY_CONTENT, new String(cloudEvent.getData().toBytes(), StandardCharsets.UTF_8));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org