mxsm commented on code in PR #3366:
URL: 
https://github.com/apache/incubator-eventmesh/pull/3366#discussion_r1129047046


##########
eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/common/EventMeshTestUtils.java:
##########
@@ -192,7 +193,7 @@ public static CloudEvent generateCloudEventV1SyncRR() {
             .withSource(URI.create("/"))
             .withDataContentType(ExampleConstants.CLOUDEVENT_CONTENT_TYPE)
             .withType(EventMeshCommon.CLOUD_EVENTS_PROTOCOL_NAME)
-            
.withData(JsonUtils.toJSONString(content).getBytes(StandardCharsets.UTF_8))
+            
.withData(Objects.requireNonNull(JsonUtils.toJSONString(content)).getBytes(StandardCharsets.UTF_8))

Review Comment:
   use Constants.DEFAULT_CHARSET replace StandardCharsets.UTF_8



##########
eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/common/EventMeshTestUtils.java:
##########
@@ -177,7 +178,7 @@ public static CloudEvent generateCloudEventV1Async() {
             .withSource(URI.create("/"))
             .withDataContentType(ExampleConstants.CLOUDEVENT_CONTENT_TYPE)
             .withType(EventMeshCommon.CLOUD_EVENTS_PROTOCOL_NAME)
-            
.withData(JsonUtils.toJSONString(content).getBytes(StandardCharsets.UTF_8))
+            
.withData(Objects.requireNonNull(JsonUtils.toJSONString(content)).getBytes(StandardCharsets.UTF_8))

Review Comment:
   use Constants.DEFAULT_CHARSET replace StandardCharsets.UTF_8



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