jjbiggins commented on code in PR #3135:
URL: 
https://github.com/apache/incubator-eventmesh/pull/3135#discussion_r1106529350


##########
eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/MessageUtils.java:
##########
@@ -91,14 +86,14 @@ public static Package asyncMessageAck(Package in) {
 
     public static Package buildPackage(Object message, Command command) {
         final Package msg = new Package();
-        msg.setHeader(new Header(command, 0, null, 
generateRandomString(SEQ_LENGTH)));
+        msg.setHeader(new Header(command, 0, null, generateRandomString()));
         if (message instanceof CloudEvent) {
             final CloudEvent cloudEvent = (CloudEvent) message;
-            Preconditions.checkNotNull(cloudEvent.getDataContentType(), 
"DateContentType cannot be null");
+            
Preconditions.checkNotNull(Objects.requireNonNull(cloudEvent.getDataContentType()),
 "DateContentType cannot be null");

Review Comment:
   Removed duplicated not null check



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