slfan1989 commented on code in PR #1656:
URL: https://github.com/apache/ratis/pull/1656#discussion_r4354494965


##########
ratis-client/src/main/java/org/apache/ratis/client/impl/MessageStreamImpl.java:
##########
@@ -82,8 +82,8 @@ public MessageOutputStream stream() {
   @Override
   public CompletableFuture<RaftClientReply> streamAsync(Message message, 
SizeInBytes subSize) {
     final int n = subSize.getSizeInt();
+    final ByteString bytes = 
Objects.requireNonNull(Message.toByteString(message), "message content == 
null");
     final MessageOutputStream out = stream();
-    final ByteString bytes = Message.toByteString(message);

Review Comment:
   Thanks @szetszwo for the review! Updated to check `message` for null on the 
first line.



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

Reply via email to