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/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 6ceec916d Update TcpMessageProtocolResolver.java
new 73736d2fb Merge pull request #3657 from harshithasudhakar/patch-15
6ceec916d is described below
commit 6ceec916dfb7f177d452730548b14ca66c648e91
Author: Harshitha Sudhakar
<[email protected]>
AuthorDate: Fri Apr 7 15:44:04 2023 +0530
Update TcpMessageProtocolResolver.java
Included "import java.util.Objects;" at line 28. Included
"Object.requireNonNull()" at line 80
---
.../protocol/cloudevents/resolver/tcp/TcpMessageProtocolResolver.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/tcp/TcpMessageProtocolResolver.java
b/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/tcp/TcpMessageProtocolResolver.java
index b35208b4a..5f866df92 100644
---
a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/tcp/TcpMessageProtocolResolver.java
+++
b/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/tcp/TcpMessageProtocolResolver.java
@@ -25,6 +25,7 @@ import
org.apache.eventmesh.protocol.cloudevents.CloudEventsProtocolConstant;
import org.apache.commons.lang3.StringUtils;
import java.nio.charset.StandardCharsets;
+import java.util.Objects;
import io.cloudevents.CloudEvent;
import io.cloudevents.SpecVersion;
@@ -77,7 +78,7 @@ public class TcpMessageProtocolResolver {
} else if (StringUtils.equals(SpecVersion.V03.toString(),
protocolVersion)) {
// todo:resolve different format
- CloudEvent event =
EventFormatProvider.getInstance().resolveFormat(JsonFormat.CONTENT_TYPE)
+ CloudEvent event =
Objects.requireNonNull(EventFormatProvider.getInstance().resolveFormat(JsonFormat.CONTENT_TYPE))
.deserialize(cloudEventJson.getBytes(StandardCharsets.UTF_8));
cloudEventBuilder = CloudEventBuilder.v03(event);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]