Issue #486 - JDK 9 ALPN implementation.
Prevented NPEs in case there is no ALPN provider.
This commit is contained in:
parent
76e9849fcd
commit
b6e603a467
|
@ -44,7 +44,8 @@ public class JDK9ClientALPNProcessor implements ALPNProcessor.Client
|
|||
try
|
||||
{
|
||||
ALPN.ClientProvider provider = (ALPN.ClientProvider)ALPN.get(sslEngine);
|
||||
provider.selected(sslEngine.getApplicationProtocol());
|
||||
if (provider != null)
|
||||
provider.selected(sslEngine.getApplicationProtocol());
|
||||
}
|
||||
catch (SSLException x)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ public class JDK9ServerALPNProcessor implements ALPNProcessor.Server, SslHandsha
|
|||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("ALPN selecting among client{}", protocols);
|
||||
ALPN.ServerProvider provider = (ALPN.ServerProvider)ALPN.remove(sslEngine);
|
||||
return provider.select(protocols);
|
||||
return provider == null ? "" : provider.select(protocols);
|
||||
}
|
||||
catch (SSLException x)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue