ivmaykov commented on a change in pull request #728: ZOOKEEPER-3160: Custom 
User SSLContext
URL: https://github.com/apache/zookeeper/pull/728#discussion_r248849244
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java
 ##########
 @@ -238,18 +239,19 @@ public int getSslHandshakeTimeoutMillis() {
         return result;
     }
 
+    @SuppressWarnings("unchecked")
     public SSLContext createSSLContext(ZKConfig config) throws 
SSLContextException {
-        if (config.getProperty(sslClientContextProperty) != null) {
-            LOG.debug("Loading SSLContext from property '" + 
sslClientContextProperty + "'");
-            String sslClientContextClass = 
config.getProperty(sslClientContextProperty);
+        if (config.getProperty(sslContextSupplierClassProperty) != null) {
+            LOG.debug("Loading SSLContext supplier from property '" + 
sslContextSupplierClassProperty + "'");
+            String supplierContextClassName = 
config.getProperty(sslContextSupplierClassProperty);
 
 Review comment:
   super nit: get the property before the first `if` in this method and store 
in a local variable, so you don't call `config.getProperty()` multiple times?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Reply via email to