Chomp v9.11版本的 MD5 值为:86ab69d1e20ec410efefb0967588d151
以下内容为反编译后的 DiDns.java 源代码,内容仅作参考
package com.smaato.sdk.core.dns;
import com.smaato.sdk.core.di.DiConstructor;
import com.smaato.sdk.core.di.DiRegistry;
import com.smaato.sdk.core.util.collections.Sets;
import com.smaato.sdk.core.util.fi.Supplier;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
public final class DiDns {
private static final Set<InetAddress> DNS_SERVERS;
static {
InetAddress[] inetAddressArr = new InetAddress[2];
try {
InetAddress byName = InetAddress.getByName("8.8.8.8".toString());
if (!(byName instanceof Inet4Address)) {
throw new IllegalArgumentException();
}
inetAddressArr[0] = (Inet4Address) byName;
try {
InetAddress byName2 = InetAddress.getByName("[2001:4860:4860::8888]".toString());
if (!(byName2 instanceof Inet6Address)) {
throw new IllegalArgumentException();
}
inetAddressArr[1] = (Inet6Address) byName2;
DNS_SERVERS = Sets.of(inetAddressArr);
} catch (UnknownHostException e10) {
throw new IllegalArgumentException(e10);
}
} catch (UnknownHostException e11) {
throw new IllegalArgumentException(e11);
}
}
private DiDns() {
}
public static void a(DiRegistry diRegistry) {
lambda$createRegistry$4(diRegistry);
}
public static DiRegistry createRegistry() {
return DiRegistry.of(new com.smaato.sdk.banner.view.a(21));
}
public static DnsResolver lambda$createRegistry$0(DiConstructor diConstructor) {
return new DnsResolver((c) diConstructor.get(c.class));
}
public static Integer lambda$createRegistry$1() {
AtomicInteger atomicInteger;
int i10;
int i11;
do {
atomicInteger = b.f11160a;
i10 = atomicInteger.get();
i11 = i10 + 1;
if (i11 > 16777215) {
i11 = 1;
}
} while (!atomicInteger.compareAndSet(i10, i11));
return Integer.valueOf(i10);
}
public static c lambda$createRegistry$2(DiConstructor diConstructor) {
return new c((d) diConstructor.get(d.class), new Supplier() {
@Override
public final Object get() {
Integer lambda$createRegistry$1;
lambda$createRegistry$1 = DiDns.lambda$createRegistry$1();
return lambda$createRegistry$1;
}
}, DNS_SERVERS);
}
public static d lambda$createRegistry$3(DiConstructor diConstructor) {
return new d();
}
public static void lambda$createRegistry$4(DiRegistry diRegistry) {
diRegistry.registerFactory(DnsResolver.class, new r6.a(26));
diRegistry.registerFactory(c.class, new r6.a(27));
diRegistry.registerFactory(d.class, new r6.a(28));
}
}