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 0dca08ab12
commit 54a27ef07e

View File

@ -649,12 +649,12 @@ public abstract class SslContext {
}
switch (provider) {
case JDK:
new JdkSslClientContext(trustCertChainFile, trustManagerFactory, keyCertChainFile, keyFile, keyPassword,
keyManagerFactory, ciphers, cipherFilter, apn, sessionCacheSize, sessionTimeout);
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();