Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.diyidan.game.network.util;
|
||||
|
||||
import com.diyidan.game.util.Utils;
|
||||
import com.squareup.okhttp.Dns;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/* JADX INFO: loaded from: C:\Users\11789\Documents\Projects\Codex_ws\myrzx_fang\analysis\base_classes.dex */
|
||||
public class DydOkHttpNetwork implements Dns {
|
||||
@Override // com.squareup.okhttp.Dns
|
||||
public List<InetAddress> lookup(String str) throws UnknownHostException {
|
||||
if (str == null) {
|
||||
throw new UnknownHostException("host == null");
|
||||
}
|
||||
String[] addressesByName = HttpDNS.getAddressesByName(str);
|
||||
if (Utils.isArrayEmpty(addressesByName)) {
|
||||
return Arrays.asList(InetAddress.getAllByName(str));
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (String str2 : addressesByName) {
|
||||
arrayList.add(InetAddress.getByName(str2));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user