refactoring

pull/3806/head
Nikita Koksharov 4 years ago
parent feeb42850d
commit 44c8d25a16

@ -163,13 +163,7 @@ public class RedisChannelInitializer extends ChannelInitializer<Channel> {
SSLParameters sslParams = new SSLParameters(); SSLParameters sslParams = new SSLParameters();
if (config.isSslEnableEndpointIdentification()) { if (config.isSslEnableEndpointIdentification()) {
// TODO remove for JDK 1.7+ sslParams.setEndpointIdentificationAlgorithm("HTTPS");
try {
Method method = sslParams.getClass().getDeclaredMethod("setEndpointIdentificationAlgorithm", String.class);
method.invoke(sslParams, "HTTPS");
} catch (Exception e) {
throw new SSLException(e);
}
} else { } else {
if (config.getSslTruststore() == null) { if (config.getSslTruststore() == null) {
sslContextBuilder.trustManager(InsecureTrustManagerFactory.INSTANCE); sslContextBuilder.trustManager(InsecureTrustManagerFactory.INSTANCE);

Loading…
Cancel
Save