Fix NoClassDefFoundError when netty-tcnative is unavailable
Motivation: ProxyHandlerTest fails with NoClassDefFoundError raised by SslContext.newClientContext(). Modifications: Fix a missing 'return' statement that makes the switch-case block fall through unncecessarily Result: - ProxyHandlerTest does not fail anymore. - SslContext.newClientContext() does not raise NoClassDefFoundError anymore.
This commit is contained in:
parent
20f5974f01
commit
42683980fc
@ -479,12 +479,12 @@ public abstract class SslContext {
|
||||
}
|
||||
switch (provider) {
|
||||
case JDK:
|
||||
new JdkSslClientContext(trustCertChainFile, trustManagerFactory, keyCertChainFile, keyFile, keyPassword,
|
||||
return new JdkSslClientContext(
|
||||
trustCertChainFile, trustManagerFactory, keyCertChainFile, keyFile, keyPassword,
|
||||
keyManagerFactory, ciphers, cipherFilter, apn, sessionCacheSize, sessionTimeout);
|
||||
case OPENSSL:
|
||||
return new OpenSslClientContext(
|
||||
trustCertChainFile, trustManagerFactory,
|
||||
ciphers, apn, sessionCacheSize, sessionTimeout);
|
||||
trustCertChainFile, trustManagerFactory, ciphers, apn, sessionCacheSize, sessionTimeout);
|
||||
}
|
||||
// Should never happen!!
|
||||
throw new Error();
|
||||
|
Loading…
Reference in New Issue
Block a user