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) { switch (provider) {
case JDK: case JDK:
new JdkSslClientContext(trustCertChainFile, trustManagerFactory, keyCertChainFile, keyFile, keyPassword, return new JdkSslClientContext(
keyManagerFactory, ciphers, cipherFilter, apn, sessionCacheSize, sessionTimeout); trustCertChainFile, trustManagerFactory, keyCertChainFile, keyFile, keyPassword,
keyManagerFactory, ciphers, cipherFilter, apn, sessionCacheSize, sessionTimeout);
case OPENSSL: case OPENSSL:
return new OpenSslClientContext( return new OpenSslClientContext(
trustCertChainFile, trustManagerFactory, trustCertChainFile, trustManagerFactory, ciphers, apn, sessionCacheSize, sessionTimeout);
ciphers, apn, sessionCacheSize, sessionTimeout);
} }
// Should never happen!! // Should never happen!!
throw new Error(); throw new Error();