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 6666
6767public class HttpClientJavaLib extends GXHttpClient {
6868
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 ]};
7973 }
80- }
74+ return allIps ;
75+ };
8176
8277 private static String getGxIpResolverConfig () {
8378 String name = "GX_USE_FIRST_IP_DNS" ;
You can’t perform that action at this time.
0 commit comments