pandaapo commented on code in PR #4337:
URL: https://github.com/apache/eventmesh/pull/4337#discussion_r1285750319


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/EventMeshCloudEventUtils.java:
##########
@@ -363,15 +275,15 @@ public static String getDataContent(CloudEvent 
cloudEvent) {
     public static String getDataContent(final CloudEvent cloudEvent, String 
defaultValue) {
         String dataContentType = getDataContentType(cloudEvent);
         if (ProtoSupport.isTextContent(dataContentType)) {
-            return 
Optional.ofNullable(cloudEvent.getTextData()).orElse(defaultValue);
+            return Optional.of(cloudEvent.getTextData()).orElse(defaultValue);

Review Comment:
   After making this modification, does `orElse()`  become redundant?



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