Skip to content

Commit bdcfc0a

Browse files
committed
Reverted change from transport factory
1 parent fb3805a commit bdcfc0a

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

xds/src/main/java/io/grpc/xds/GrpcXdsTransportFactory.java

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import io.grpc.CallOptions;
2424
import io.grpc.ChannelCredentials;
2525
import io.grpc.ClientCall;
26-
import io.grpc.CompositeCallCredentials;
27-
import io.grpc.CompositeChannelCredentials;
2826
import io.grpc.Context;
2927
import io.grpc.Grpc;
3028
import io.grpc.ManagedChannel;
@@ -70,23 +68,11 @@ public GrpcXdsTransport(ManagedChannel channel) {
7068

7169
public GrpcXdsTransport(Bootstrapper.ServerInfo serverInfo, CallCredentials callCredentials) {
7270
String target = serverInfo.target();
73-
Object implSpecificConfig = serverInfo.implSpecificConfig();
74-
75-
this.channel = Grpc.newChannelBuilder(target, (ChannelCredentials) implSpecificConfig)
71+
ChannelCredentials channelCredentials = (ChannelCredentials) serverInfo.implSpecificConfig();
72+
this.channel = Grpc.newChannelBuilder(target, channelCredentials)
7673
.keepAliveTime(5, TimeUnit.MINUTES)
7774
.build();
78-
79-
if (callCredentials != null && implSpecificConfig instanceof CompositeChannelCredentials) {
80-
this.callCredentials =
81-
new CompositeCallCredentials(
82-
callCredentials,
83-
((CompositeChannelCredentials) implSpecificConfig).getCallCredentials());
84-
} else if (implSpecificConfig instanceof CompositeChannelCredentials) {
85-
this.callCredentials =
86-
((CompositeChannelCredentials) implSpecificConfig).getCallCredentials();
87-
} else {
88-
this.callCredentials = callCredentials;
89-
}
75+
this.callCredentials = callCredentials;
9076
}
9177

9278
@VisibleForTesting

0 commit comments

Comments
 (0)