Bhaskar1312 commented on code in PR #3374:
URL: 
https://github.com/apache/incubator-eventmesh/pull/3374#discussion_r1131375579


##########
eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/producer/CloudEventProducer.java:
##########
@@ -75,7 +76,7 @@ private void validateCloudEvent(final CloudEvent cloudEvent) {
 
     private RequestParam buildCommonPostParam(final CloudEvent cloudEvent) {
         validateCloudEvent(cloudEvent);
-        final byte[] bodyByte = 
EventFormatProvider.getInstance().resolveFormat(cloudEvent.getDataContentType())
+        final byte[] bodyByte = 
Objects.requireNonNull(EventFormatProvider.getInstance().resolveFormat(cloudEvent.getDataContentType()))
             .serialize(cloudEvent);
         final String content = new String(bodyByte, StandardCharsets.UTF_8);

Review Comment:
   My IDE is not recogninzing this Constants.DEFAULT_CHARSET. Can you put the 
import as well?



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