Clarify exception message when ALPN is not supported (#10155)
Motivation: We should provide more informations when ALPN is not supported and a user tries to use it. Modifications: - Use UnsupportedOperationException Result: Easier to debug ALPN problems
This commit is contained in:
parent
5cd00d22d9
commit
d0c2f6e8b3
@ -144,7 +144,8 @@ public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicati
|
|||||||
return isServer ? JettyAlpnSslEngine.newServerEngine(engine, applicationNegotiator)
|
return isServer ? JettyAlpnSslEngine.newServerEngine(engine, applicationNegotiator)
|
||||||
: JettyAlpnSslEngine.newClientEngine(engine, applicationNegotiator);
|
: JettyAlpnSslEngine.newClientEngine(engine, applicationNegotiator);
|
||||||
}
|
}
|
||||||
throw new RuntimeException("Unable to wrap SSLEngine of type " + engine.getClass().getName());
|
throw new UnsupportedOperationException("ALPN not supported. Unable to wrap SSLEngine of type '"
|
||||||
|
+ engine.getClass().getName() + "')");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user