diff --git a/servicetalk-grpc-netty/src/main/java/io/servicetalk/grpc/netty/DefaultGrpcServerBuilder.java b/servicetalk-grpc-netty/src/main/java/io/servicetalk/grpc/netty/DefaultGrpcServerBuilder.java index 9c05026032..24f3215cc9 100644 --- a/servicetalk-grpc-netty/src/main/java/io/servicetalk/grpc/netty/DefaultGrpcServerBuilder.java +++ b/servicetalk-grpc-netty/src/main/java/io/servicetalk/grpc/netty/DefaultGrpcServerBuilder.java @@ -93,8 +93,9 @@ final class DefaultGrpcServerBuilder implements GrpcServerBuilder, ServerBinder // Do not use this ctor directly, GrpcServers is the entry point for creating a new builder. DefaultGrpcServerBuilder(final Supplier httpServerBuilderSupplier) { - this.httpServerBuilderSupplier = () -> httpServerBuilderSupplier.get() - .protocols(h2Default()).allowDropRequestTrailers(true); + this.httpServerBuilderSupplier = () -> + requireNonNull(httpServerBuilderSupplier.get(), "Supplier result was null") + .protocols(h2Default()).allowDropRequestTrailers(true); } @Override