Fix NPE
This commit is contained in:
parent
5ce410c69e
commit
2f8c13e85a
@ -106,7 +106,8 @@ public final class JdkSslClientContext extends JdkSslContext {
|
||||
|
||||
super(ciphers);
|
||||
|
||||
if (nextProtocols != null && nextProtocols.iterator().hasNext() && !JettyNpnSslEngine.isAvailable()) {
|
||||
if (nextProtocols != null && nextProtocols.iterator().hasNext()) {
|
||||
if (!JettyNpnSslEngine.isAvailable()) {
|
||||
throw new SSLException("NPN/ALPN unsupported: " + nextProtocols);
|
||||
}
|
||||
|
||||
@ -118,6 +119,9 @@ public final class JdkSslClientContext extends JdkSslContext {
|
||||
nextProtoList.add(p);
|
||||
}
|
||||
this.nextProtocols = Collections.unmodifiableList(nextProtoList);
|
||||
} else {
|
||||
this.nextProtocols = Collections.emptyList();
|
||||
}
|
||||
|
||||
try {
|
||||
if (certChainFile == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user