diff --git a/webclient/api/src/main/java/io/helidon/webclient/api/DefaultAddressLookupFinder.java b/webclient/api/src/main/java/io/helidon/webclient/api/DefaultAddressLookupFinder.java index 5f1f5942fe7..68941d93f9f 100644 --- a/webclient/api/src/main/java/io/helidon/webclient/api/DefaultAddressLookupFinder.java +++ b/webclient/api/src/main/java/io/helidon/webclient/api/DefaultAddressLookupFinder.java @@ -41,10 +41,14 @@ final class DefaultAddressLookupFinder { private static final LazyValue DEFAULT_IP_VERSION = LazyValue.create(() -> { if (IPV4_PREFERRED.get() || !IPV6_PREFERRED.get()) { - LOGGER.log(Level.DEBUG, "Preferring IPv4 over IPv6 address resolution"); + if (LOGGER.isLoggable(Level.DEBUG)) { + LOGGER.log(Level.DEBUG, "Preferring IPv4 over IPv6 address resolution"); + } return DnsAddressLookup.IPV4_PREFERRED; } - LOGGER.log(Level.DEBUG, "Preferring IPv6 over IPv4 address resolution"); + if (LOGGER.isLoggable(Level.DEBUG)) { + LOGGER.log(Level.DEBUG, "Preferring IPv6 over IPv4 address resolution"); + } return DnsAddressLookup.IPV6_PREFERRED; }); diff --git a/webclient/api/src/main/java/io/helidon/webclient/spi/DnsResolver.java b/webclient/api/src/main/java/io/helidon/webclient/spi/DnsResolver.java index ba376096af3..930a8df9e6f 100644 --- a/webclient/api/src/main/java/io/helidon/webclient/spi/DnsResolver.java +++ b/webclient/api/src/main/java/io/helidon/webclient/spi/DnsResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. + * Copyright (c) 2022, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,11 +27,13 @@ public interface DnsResolver { /** * Whether to use standard Java DNS resolver. - * If this method returns true, {@link #resolveAddress(String, io.helidon.webclient.api.DnsAddressLookup)} method is not invoked and - * no {@link DnsAddressLookup} preferences will be applied. + * If this method returns true, {@link #resolveAddress(String, io.helidon.webclient.api.DnsAddressLookup)} + * method is not invoked and no {@link DnsAddressLookup} preferences will be applied. * * @return use standard Java resolver + * @deprecated this method is no longer invoked and may be removed in the future */ + @Deprecated(forRemoval = true, since = "4.0.4") default boolean useDefaultJavaResolver() { return false; }