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
5ba4fdf3ba
commit
cf6eb70f93
@ -649,12 +649,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