chia7712 commented on code in PR #16169:
URL: https://github.com/apache/kafka/pull/16169#discussion_r1623634685


##########
clients/src/test/java/org/apache/kafka/common/network/DefaultChannelMetadataRegistry.java:
##########
@@ -22,9 +22,10 @@ public class DefaultChannelMetadataRegistry implements 
ChannelMetadataRegistry {
 
     @Override
     public void registerCipherInformation(final CipherInformation 
cipherInformation) {
-        if (this.cipherInformation != null) {
-            this.cipherInformation = cipherInformation;
+        if (cipherInformation == null) {
+            throw new IllegalArgumentException("cipherInformation cannot be 
null");

Review Comment:
   It would be nice that the thrown exception is same to 
`SelectorChannelMetadataRegistry#registerCipherInformation`. Could you check 
that?



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