File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed
xds/src/main/java/io/grpc/xds Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change 2323import io .grpc .CallOptions ;
2424import io .grpc .ChannelCredentials ;
2525import io .grpc .ClientCall ;
26- import io .grpc .CompositeCallCredentials ;
27- import io .grpc .CompositeChannelCredentials ;
2826import io .grpc .Context ;
2927import io .grpc .Grpc ;
3028import 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
You can’t perform that action at this time.
0 commit comments