You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eventmesh.apache.org by "nikam14 (via GitHub)" <gi...@apache.org> on 2023/04/14 06:22:57 UTC
[GitHub] [eventmesh] nikam14 commented on a diff in pull request #3715: fixes#3505 [Enhancement] Do some code optimization[EtcdRegistryService]
nikam14 commented on code in PR #3715:
URL: https://github.com/apache/eventmesh/pull/3715#discussion_r1166333668
##########
eventmesh-registry-plugin/eventmesh-registry-etcd/src/main/java/org/apache/eventmesh/registry/etcd/service/EtcdRegistryService.java:
##########
@@ -204,7 +206,7 @@ public boolean register(EventMeshRegisterInfo eventMeshRegisterInfo) throws Regi
EventMeshDataInfo eventMeshDataInfo =
new EventMeshDataInfo(eventMeshClusterName, eventMeshName,
endPoint, System.currentTimeMillis(), eventMeshRegisterInfo.getMetadata());
- ByteSequence etcdValue = ByteSequence.from(JsonUtils.toJSONString(eventMeshDataInfo).getBytes(Constants.DEFAULT_CHARSET));
+ ByteSequence etcdValue = ByteSequence.from(Objects.requireNonNull(JsonUtils.toJSONString(eventMeshDataInfo)).getBytes(Constants.DEFAULT_CHARSET));
Review Comment:
Thanks for your help.
--
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: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org