netty: check for null protocol negotiator in NettyChannelBuilder

This commit is contained in:
Carl Mastrangelo 2019-08-15 11:11:31 -07:00 committed by GitHub
parent ad47eee4d3
commit 21c34d7862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -545,7 +545,7 @@ public final class NettyChannelBuilder
int flowControlWindow, int maxMessageSize, int maxHeaderListSize,
long keepAliveTimeNanos, long keepAliveTimeoutNanos, boolean keepAliveWithoutCalls,
TransportTracer.Factory transportTracerFactory, LocalSocketPicker localSocketPicker) {
this.protocolNegotiator = protocolNegotiator;
this.protocolNegotiator = checkNotNull(protocolNegotiator, "protocolNegotiator");
this.channelFactory = channelFactory;
this.channelOptions = new HashMap<ChannelOption<?>, Object>(channelOptions);
this.groupPool = groupPool;