machi1990 commented on code in PR #13966:
URL: https://github.com/apache/kafka/pull/13966#discussion_r1266704046


##########
clients/src/main/java/org/apache/kafka/common/network/DefaultChannelMetadataRegistry.java:
##########
@@ -16,15 +16,15 @@
  */
 package org.apache.kafka.common.network;
 
+import java.util.Objects;
+
 public class DefaultChannelMetadataRegistry implements ChannelMetadataRegistry 
{
     private CipherInformation cipherInformation;
     private ClientInformation clientInformation;
 
     @Override
     public void registerCipherInformation(final CipherInformation 
cipherInformation) {
-        if (this.cipherInformation != null) {
-            this.cipherInformation = cipherInformation;
-        }
+        this.cipherInformation =  Objects.requireNonNull(cipherInformation);

Review Comment:
   Thanks for the reply. I've updated the PR.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to