File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
java/src/main/java/com/genexus/internet Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 66
66
67
67
public class HttpClientJavaLib extends GXHttpClient {
68
68
69
- private static class FirstIpDnsResolver implements DnsResolver {
70
- private final DnsResolver defaultDnsResolver = new SystemDefaultDnsResolver ();
71
-
72
- @ Override
73
- public InetAddress [] resolve (final String host ) throws UnknownHostException {
74
- InetAddress [] allIps = defaultDnsResolver .resolve (host );
75
- if (allIps != null && allIps .length > 0 ) {
76
- return new InetAddress []{allIps [0 ]};
77
- }
78
- return allIps ;
69
+ private static final DnsResolver FIRST_IP_DNS_RESOLVER = host -> {
70
+ InetAddress [] allIps = SystemDefaultDnsResolver .INSTANCE .resolve (host );
71
+ if (allIps != null && allIps .length > 0 ) {
72
+ return new InetAddress []{allIps [0 ]};
79
73
}
80
- }
74
+ return allIps ;
75
+ };
81
76
82
77
private static String getGxIpResolverConfig () {
83
78
String name = "GX_USE_FIRST_IP_DNS" ;
You can’t perform that action at this time.
0 commit comments