Skip to content

Commit a9a019b

Browse files
committed
Remove the code handling for impossible exception.
1 parent 4273452 commit a9a019b

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,6 @@ protected void userEventTriggered0(ChannelHandlerContext ctx, Object evt) throws
585585
}
586586

587587
static final class ClientTlsProtocolNegotiator implements ProtocolNegotiator {
588-
private static final Logger logger =
589-
Logger.getLogger(ClientTlsProtocolNegotiator.class.getName());
590588
private static final Method checkServerTrustedMethod;
591589

592590
static {
@@ -600,8 +598,6 @@ static final class ClientTlsProtocolNegotiator implements ProtocolNegotiator {
600598
// Per-rpc authority overriding via call options will be disallowed.
601599
} catch (NoSuchMethodException e) {
602600
// Should never happen.
603-
logger.log(Level.WARNING, "Method checkServerTrusted not found in "
604-
+ "javax.net.ssl.X509ExtendedTrustManager", e);
605601
}
606602
checkServerTrustedMethod = method;
607603
}
@@ -676,10 +672,6 @@ public void setSslEngine(SSLEngine sslEngine) {
676672
private void verifyAuthorityAllowedForPeerCert(String authority)
677673
throws SSLPeerUnverifiedException, CertificateException, InvocationTargetException,
678674
IllegalAccessException {
679-
if (checkServerTrustedMethod == null) {
680-
throw new IllegalStateException("Method checkServerTrusted not found in "
681-
+ "javax.net.ssl.X509ExtendedTrustManager");
682-
}
683675
SSLEngine sslEngineWrapper = new SslEngineWrapper(sslEngine, authority);
684676
// The typecasting of Certificate to X509Certificate should work because this method will only
685677
// be called when using TLS and thus X509.

0 commit comments

Comments
 (0)