what-the-bank/sources/io/grpc/ChoiceChannelCredentials.java

40 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package io.grpc;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes6.dex */
public final class ChoiceChannelCredentials extends ChannelCredentials {
private final List<ChannelCredentials> creds;
public static ChannelCredentials create(ChannelCredentials... channelCredentialsArr) {
if (channelCredentialsArr.length == 0) {
throw new IllegalArgumentException("At least one credential is required");
}
for (ChannelCredentials channelCredentials : channelCredentialsArr) {
}
return new ChoiceChannelCredentials(Collections.unmodifiableList(new ArrayList(Arrays.asList(channelCredentialsArr))));
}
private ChoiceChannelCredentials(List<ChannelCredentials> list) {
this.creds = list;
}
@Override // io.grpc.ChannelCredentials
public final ChannelCredentials withoutBearerTokens() {
ArrayList arrayList = new ArrayList();
Iterator<ChannelCredentials> it = this.creds.iterator();
while (it.hasNext()) {
arrayList.add(it.next().withoutBearerTokens());
}
return new ChoiceChannelCredentials(Collections.unmodifiableList(arrayList));
}
public final List<ChannelCredentials> getCredentialsList() {
return this.creds;
}
}