mxsm commented on code in PR #3660:
URL: https://github.com/apache/eventmesh/pull/3660#discussion_r1160773695


##########
eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/CloudEventsProtocolAdaptor.java:
##########
@@ -127,7 +128,8 @@ public ProtocolTransportObject fromCloudEvent(CloudEvent 
cloudEvent) throws Prot
                 @Override
                 public Map<String, Object> toMap() {
                     byte[] eventByte =
-                        
EventFormatProvider.getInstance().resolveFormat(JsonFormat.CONTENT_TYPE).serialize(cloudEvent);
+                        
Objects.requireNonNull(EventFormatProvider.getInstance()
+                            
.resolveFormat(JsonFormat.CONTENT_TYPE)).serialize(cloudEvent);
                     map.put("content", new String(eventByte, 
StandardCharsets.UTF_8));

Review Comment:
   StandardCharsets.UTF_8 replace with Constants.DEFAULT_CHARSET



-- 
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]

Reply via email to