Github user arankin-irl commented on the issue:

    https://github.com/apache/zookeeper/pull/728
  
    > One tiny suggestion: instead of wrapping the original behaviour in an 
if-else branch, I'd rather create a new class which implements your interface 
ZKClientSSLContext and call it for example DefaultClientSSLContext.
    
    @anmolnar - I did have a look at doing something similar to that, but the 
`X509Util` methods and variables feature heavily in the creation of the 
`SSLContext`. Moving these to a `DefaultClientSSLContext` looks like it'd be a 
fair rewrite of the class.
    
    Then again, I'm not really a fan of the current if/else situation - 
however, maybe an acceptable solution would be to move the `else` branch to a 
new method, like `createSSLContextFromConfig()`?


---

Reply via email to