From 82fce837e4fe8ce51b5beae6dabb24c126a4dd43 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Thu, 1 Jun 2017 14:38:05 -0700 Subject: [PATCH] core: don't return concrete type from AbstractServerImplBuilder --- .../src/main/java/io/grpc/benchmarks/driver/LoadWorker.java | 4 ++-- .../main/java/io/grpc/internal/AbstractServerImplBuilder.java | 3 ++- .../test/java/io/grpc/testing/integration/CascadingTest.java | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/benchmarks/src/main/java/io/grpc/benchmarks/driver/LoadWorker.java b/benchmarks/src/main/java/io/grpc/benchmarks/driver/LoadWorker.java index c1290e5f24..87526653f2 100644 --- a/benchmarks/src/main/java/io/grpc/benchmarks/driver/LoadWorker.java +++ b/benchmarks/src/main/java/io/grpc/benchmarks/driver/LoadWorker.java @@ -17,13 +17,13 @@ package io.grpc.benchmarks.driver; import com.google.common.util.concurrent.ThreadFactoryBuilder; +import io.grpc.Server; import io.grpc.Status; import io.grpc.benchmarks.proto.Control; import io.grpc.benchmarks.proto.Control.ClientArgs; import io.grpc.benchmarks.proto.Control.ServerArgs; import io.grpc.benchmarks.proto.Control.ServerArgs.ArgtypeCase; import io.grpc.benchmarks.proto.WorkerServiceGrpc; -import io.grpc.internal.ServerImpl; import io.grpc.netty.NettyServerBuilder; import io.grpc.stub.StreamObserver; import io.netty.channel.nio.NioEventLoopGroup; @@ -39,7 +39,7 @@ public class LoadWorker { private static final Logger log = Logger.getLogger(LoadWorker.class.getName()); private final int serverPort; - private final ServerImpl driverServer; + private final Server driverServer; LoadWorker(int driverPort, int serverPort) throws Exception { this.serverPort = serverPort; diff --git a/core/src/main/java/io/grpc/internal/AbstractServerImplBuilder.java b/core/src/main/java/io/grpc/internal/AbstractServerImplBuilder.java index bfe2c95c16..707f6f400f 100644 --- a/core/src/main/java/io/grpc/internal/AbstractServerImplBuilder.java +++ b/core/src/main/java/io/grpc/internal/AbstractServerImplBuilder.java @@ -31,6 +31,7 @@ import io.grpc.DecompressorRegistry; import io.grpc.HandlerRegistry; import io.grpc.Internal; import io.grpc.InternalNotifyOnServerBuild; +import io.grpc.Server; import io.grpc.ServerBuilder; import io.grpc.ServerMethodDefinition; import io.grpc.ServerServiceDefinition; @@ -155,7 +156,7 @@ public abstract class AbstractServerImplBuilder tracerFactories = new ArrayList(); StatsContextFactory statsFactory = diff --git a/interop-testing/src/test/java/io/grpc/testing/integration/CascadingTest.java b/interop-testing/src/test/java/io/grpc/testing/integration/CascadingTest.java index 3145796199..9e542d76a7 100644 --- a/interop-testing/src/test/java/io/grpc/testing/integration/CascadingTest.java +++ b/interop-testing/src/test/java/io/grpc/testing/integration/CascadingTest.java @@ -29,6 +29,7 @@ import io.grpc.Context.CancellableContext; import io.grpc.Deadline; import io.grpc.ManagedChannel; import io.grpc.Metadata; +import io.grpc.Server; import io.grpc.ServerCall; import io.grpc.ServerCallHandler; import io.grpc.ServerInterceptor; @@ -37,7 +38,6 @@ import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.inprocess.InProcessChannelBuilder; import io.grpc.inprocess.InProcessServerBuilder; -import io.grpc.internal.ServerImpl; import io.grpc.stub.ServerCallStreamObserver; import io.grpc.stub.StreamObserver; import io.grpc.testing.integration.Messages.SimpleRequest; @@ -67,7 +67,7 @@ public class CascadingTest { @Mock TestServiceGrpc.TestServiceImplBase service; private ManagedChannel channel; - private ServerImpl server; + private Server server; private CountDownLatch observedCancellations; private CountDownLatch receivedCancellations; private TestServiceGrpc.TestServiceBlockingStub blockingStub;