From f986ea9f904677885ec2add86a276bdca7c6d18d Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Wed, 19 Apr 2017 15:49:04 -0700 Subject: [PATCH] Converting NettyChannelBuilder reference to ManagedChannelBuilder --- .../com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java index 9f2f4553dddd..d32b6d385e90 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java @@ -54,9 +54,8 @@ import com.google.logging.v2.WriteLogEntriesResponse; import com.google.protobuf.Empty; import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; import io.grpc.Status.Code; -import io.grpc.netty.NegotiationType; -import io.grpc.netty.NettyChannelBuilder; import java.io.IOException; import java.util.Collections; import java.util.EnumSet; @@ -84,8 +83,8 @@ public GrpcLoggingRpc(LoggingOptions options) throws IOException { // todo(mziccard): ChannelProvider should support null/absent credentials for testing if (options.getHost().contains("localhost") || options.getCredentials().equals(NoCredentials.getInstance())) { - ManagedChannel managedChannel = NettyChannelBuilder.forTarget(options.getHost()) - .negotiationType(NegotiationType.PLAINTEXT) + ManagedChannel managedChannel = ManagedChannelBuilder.forTarget(options.getHost()) + .usePlaintext(true) .executor(executor) .build(); channelProvider = FixedChannelProvider.create(managedChannel);