Skip to content

Commit 4d71cce

Browse files
committed
commit
1 parent dd95f8f commit 4d71cce

File tree

4 files changed

+305
-37
lines changed

4 files changed

+305
-37
lines changed

core/src/main/java/io/grpc/internal/ManagedChannelImplBuilder.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,6 @@ public ManagedChannelImplBuilder(SocketAddress directServerAddress, String autho
360360
InternalConfiguratorRegistry.configureChannelBuilder(this);
361361
}
362362

363-
public ChannelCredentials getChannelCredentials() {
364-
return channelCredentials;
365-
}
366-
367363
@Override
368364
public ManagedChannelImplBuilder directExecutor() {
369365
return executor(MoreExecutors.directExecutor());

okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public final class OkHttpChannelBuilder extends ForwardingChannelBuilder2<OkHttp
9292
public static final int DEFAULT_FLOW_CONTROL_WINDOW = 65535;
9393

9494
private final ManagedChannelImplBuilder managedChannelImplBuilder;
95+
private final ChannelCredentials channelCrentials;
9596
private TransportTracer.Factory transportTracerFactory = TransportTracer.getDefaultFactory();
9697

9798

@@ -221,6 +222,7 @@ private OkHttpChannelBuilder(String target) {
221222
this.sslSocketFactory = factory;
222223
this.negotiationType = factory == null ? NegotiationType.PLAINTEXT : NegotiationType.TLS;
223224
this.freezeSecurityConfiguration = true;
225+
this.channelCrentials = channelCreds;
224226
}
225227

226228
private final class OkHttpChannelTransportFactoryBuilder
@@ -538,7 +540,7 @@ OkHttpTransportFactory buildTransportFactory() {
538540
maxInboundMetadataSize,
539541
transportTracerFactory,
540542
useGetForSafeMethods,
541-
managedChannelImplBuilder.getChannelCredentials());
543+
channelCredentials);
542544
}
543545

544546
OkHttpChannelBuilder disableCheckAuthority() {

0 commit comments

Comments
 (0)