Fix compile error introduced by 2c3d263e23
This commit is contained in:
parent
f48d9fa8d0
commit
b7ba807b30
@ -456,7 +456,7 @@ public final class SslContextBuilder {
|
|||||||
*/
|
*/
|
||||||
public SslContextBuilder keyManager(KeyManager keyManager) {
|
public SslContextBuilder keyManager(KeyManager keyManager) {
|
||||||
if (forServer) {
|
if (forServer) {
|
||||||
checkNotNull(keyManager, "keyManager required for servers");
|
requireNonNull(keyManager, "keyManager required for servers");
|
||||||
}
|
}
|
||||||
if (keyManager != null) {
|
if (keyManager != null) {
|
||||||
this.keyManagerFactory = new KeyManagerFactoryWrapper(keyManager);
|
this.keyManagerFactory = new KeyManagerFactoryWrapper(keyManager);
|
||||||
@ -584,7 +584,7 @@ public final class SslContextBuilder {
|
|||||||
if (iterable == null) {
|
if (iterable == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final List<T> list = new ArrayList<T>();
|
final List<T> list = new ArrayList<>();
|
||||||
for (T element : iterable) {
|
for (T element : iterable) {
|
||||||
list.add(element);
|
list.add(element);
|
||||||
}
|
}
|
||||||
|
@ -16,24 +16,22 @@
|
|||||||
|
|
||||||
package io.netty.handler.ssl.util;
|
package io.netty.handler.ssl.util;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|
||||||
|
|
||||||
import io.netty.util.internal.SuppressJava6Requirement;
|
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.security.PrivateKey;
|
import java.security.PrivateKey;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
|
import java.util.Objects;
|
||||||
import javax.net.ssl.SSLEngine;
|
import javax.net.ssl.SSLEngine;
|
||||||
import javax.net.ssl.X509ExtendedKeyManager;
|
import javax.net.ssl.X509ExtendedKeyManager;
|
||||||
import javax.net.ssl.X509KeyManager;
|
import javax.net.ssl.X509KeyManager;
|
||||||
|
|
||||||
@SuppressJava6Requirement(reason = "Usage guarded by java version check")
|
|
||||||
final class X509KeyManagerWrapper extends X509ExtendedKeyManager {
|
final class X509KeyManagerWrapper extends X509ExtendedKeyManager {
|
||||||
|
|
||||||
private final X509KeyManager delegate;
|
private final X509KeyManager delegate;
|
||||||
|
|
||||||
X509KeyManagerWrapper(X509KeyManager delegate) {
|
X509KeyManagerWrapper(X509KeyManager delegate) {
|
||||||
this.delegate = checkNotNull(delegate, "delegate");
|
this.delegate = Objects.requireNonNull(delegate, "delegate");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user