chia7712 commented on a change in pull request #8806:
URL: https://github.com/apache/kafka/pull/8806#discussion_r435740955



##########
File path: 
clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java
##########
@@ -134,11 +147,17 @@ private SslEngineFactory 
instantiateSslEngineFactory(Map<String, Object> configs
             sslEngineFactory = Utils.newInstance(sslEngineFactoryClass);
         }
         sslEngineFactory.configure(configs);
-        this.sslEngineFactoryConfig = configs;
-        return sslEngineFactory;
+        boolean pass = false;
+        try {
+            validator.accept(sslEngineFactory);

Review comment:
       ```configure``` and ```reconfigure``` has different checks for the new 
ssl engine factory and the new ssl engine factory should be closed 
automatically if the custom checks don't pass. 




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

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


Reply via email to