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:
Trustin Lee 2014-12-26 15:44:39 +09:00
parent 20f5974f01
commit 42683980fc

View File

@ -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();