diff --git a/build.gradle b/build.gradle index 1ae3996c99..4c683b87e6 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ subprojects { // TODO: Unreleased dependencies. // These must already be installed in the local maven repository. - netty: 'io.netty:netty-codec-http2:5.0.0.Alpha3-SNAPSHOT', + netty: 'io.netty:netty-codec-http2:4.1.0.Beta5-SNAPSHOT', // Test dependencies. junit: 'junit:junit:4.11', diff --git a/core/src/main/java/io/grpc/transport/AbstractClientStream.java b/core/src/main/java/io/grpc/transport/AbstractClientStream.java index 55fb78662e..779a9719f8 100644 --- a/core/src/main/java/io/grpc/transport/AbstractClientStream.java +++ b/core/src/main/java/io/grpc/transport/AbstractClientStream.java @@ -125,7 +125,6 @@ public abstract class AbstractClientStream extends AbstractStream * Processes the contents of a received data frame from the server. * * @param frame the received data frame. Its ownership is transferred to this method. - * @param */ protected void inboundDataReceived(Buffer frame) { Preconditions.checkNotNull(frame, "frame"); diff --git a/core/src/main/java/io/grpc/transport/HttpUtil.java b/core/src/main/java/io/grpc/transport/HttpUtil.java index 48bce6d948..7bd48f191e 100644 --- a/core/src/main/java/io/grpc/transport/HttpUtil.java +++ b/core/src/main/java/io/grpc/transport/HttpUtil.java @@ -191,7 +191,7 @@ public final class HttpUtil { /** * Looks up the {@link Status} from the given HTTP/2 error code. * - * @param errorCode the HTTP/2 error code. + * @param code the HTTP/2 error code. * @return a {@link Status} representing the given error. */ public static Status statusForCode(int code) { diff --git a/lib/netty b/lib/netty index 44ee2cac43..3df7b4dac7 160000 --- a/lib/netty +++ b/lib/netty @@ -1 +1 @@ -Subproject commit 44ee2cac433a6f8640d01a70e8b90b70852aeeae +Subproject commit 3df7b4dac746c2af2d65528bf85495eb530aba41 diff --git a/netty/src/main/java/io/grpc/transport/netty/Http2Negotiator.java b/netty/src/main/java/io/grpc/transport/netty/Http2Negotiator.java index 7a3a1814f5..451517fc6f 100644 --- a/netty/src/main/java/io/grpc/transport/netty/Http2Negotiator.java +++ b/netty/src/main/java/io/grpc/transport/netty/Http2Negotiator.java @@ -37,8 +37,8 @@ import com.google.common.util.concurrent.SettableFuture; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerAdapter; import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelInitializer; import io.netty.handler.codec.http.DefaultHttpRequest; import io.netty.handler.codec.http.HttpClientCodec; @@ -229,7 +229,7 @@ public class Http2Negotiator { /** * Report protocol upgrade completion using a promise. */ - private static class UpgradeCompletionHandler extends ChannelHandlerAdapter { + private static class UpgradeCompletionHandler extends ChannelInboundHandlerAdapter { private final SettableFuture upgradeFuture = SettableFuture.create(); public ListenableFuture getUpgradeFuture() { diff --git a/netty/src/main/java/io/grpc/transport/netty/Utils.java b/netty/src/main/java/io/grpc/transport/netty/Utils.java index 412294052c..798985cc77 100644 --- a/netty/src/main/java/io/grpc/transport/netty/Utils.java +++ b/netty/src/main/java/io/grpc/transport/netty/Utils.java @@ -45,12 +45,9 @@ import io.netty.channel.nio.NioEventLoopGroup; import io.netty.handler.codec.AsciiString; import io.netty.handler.codec.http2.DefaultHttp2Headers; import io.netty.handler.codec.http2.Http2Headers; -import io.netty.util.concurrent.ExecutorServiceFactory; import java.nio.ByteBuffer; import java.util.Map; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; /** * Common utility methods. @@ -177,13 +174,8 @@ class Utils { @Override public EventLoopGroup create() { - return new NioEventLoopGroup(0, new ExecutorServiceFactory() { - @Override - public ExecutorService newExecutorService(int parallelism) { - return Executors.newFixedThreadPool(parallelism, new ThreadFactoryBuilder() - .setNameFormat(name + "-%d").build()); - } - }); + return new NioEventLoopGroup(0, new ThreadFactoryBuilder().setNameFormat(name + "-%d") + .build()); } @Override