You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "nikam14 (via GitHub)" <gi...@apache.org> on 2023/03/08 08:22:08 UTC

[GitHub] [incubator-eventmesh] nikam14 commented on a diff in pull request #3366: [ISSUE #3260] Added Null ptr excep to method

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


##########
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:
   After replacing StandardCharsets.UTF_8 with Constants.DEFAULT_CHARSET Do I have make any other changes.



-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org