xwm1992 commented on code in PR #1991:
URL:
https://github.com/apache/incubator-eventmesh/pull/1991#discussion_r1007763601
##########
eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/http/SendMessageRequestProtocolResolver.java:
##########
@@ -62,6 +62,10 @@ public static CloudEvent buildEvent(Header header, Body
body) throws ProtocolHan
CloudEvent event = null;
if (StringUtils.equals(SpecVersion.V1.toString(),
protocolVersion)) {
+ if(EventFormatProvider.getInstance() == null ||
Review Comment:
please use `Object.requireNonNull` instead of return `null`
##########
eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/http/SendMessageRequestProtocolResolver.java:
##########
@@ -81,6 +85,10 @@ public static CloudEvent buildEvent(Header header, Body
body) throws ProtocolHan
.withExtension(SendMessageRequestBody.PRODUCERGROUP,
producerGroup)
.build();
} else if (StringUtils.equals(SpecVersion.V03.toString(),
protocolVersion)) {
+ if(EventFormatProvider.getInstance() == null ||
Review Comment:
same as above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]