Github user ivmaykov commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/678#discussion_r229011448
  
    --- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/common/X509Util.java ---
    @@ -167,47 +222,50 @@ public SSLContext createSSLContext(ZKConfig config) 
throws SSLContextException {
             KeyManager[] keyManagers = null;
             TrustManager[] trustManagers = null;
     
    -        String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty);
    -        String keyStorePasswordProp = 
config.getProperty(sslKeystorePasswdProperty);
    +        String keyStoreLocationProp = 
config.getProperty(sslKeystoreLocationProperty, "");
    --- End diff --
    
    Since empty string is not a valid keystore type, I treat null value and 
empty string values equivalently. Doing it this way simplifies the check below 
(only need to check for empty string instead of checking both null and empty).


---

Reply via email to