what-the-bank/sources/okhttp3/Dns.java

41 lines
1.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.List;
import o.C14875gap;
import o.C14957gcv;
/* loaded from: classes.dex */
public interface Dns {
public static final Companion Companion = Companion.$$INSTANCE;
public static final Dns SYSTEM = new Companion.DnsSystem();
List<InetAddress> lookup(String str) throws UnknownHostException;
/* loaded from: classes.dex */
public static final class Companion {
static final Companion $$INSTANCE = new Companion();
private Companion() {
}
/* loaded from: classes.dex */
static final class DnsSystem implements Dns {
@Override // okhttp3.Dns
public final List<InetAddress> lookup(String str) {
C14957gcv.e(str, "");
try {
InetAddress[] allByName = InetAddress.getAllByName(str);
C14957gcv.c(allByName, "");
return C14875gap.d(allByName);
} catch (NullPointerException e) {
UnknownHostException unknownHostException = new UnknownHostException(C14957gcv.c("Broken system behaviour for dns lookup of ", (Object) str));
unknownHostException.initCause(e);
throw unknownHostException;
}
}
}
}
}