src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java
branchhttp-client-branch
changeset 56165 8a6065d830b9
parent 56137 dd867826d55b
child 56255 39e28481492d
equal deleted inserted replaced
56164:4db4bec0e5bb 56165:8a6065d830b9
   803      * Enabled by default. May be disabled for testing. Use with care
   803      * Enabled by default. May be disabled for testing. Use with care
   804      */
   804      */
   805     public static boolean isHostnameVerificationDisabled() {
   805     public static boolean isHostnameVerificationDisabled() {
   806         return isHostnameVerificationDisabled;
   806         return isHostnameVerificationDisabled;
   807     }
   807     }
       
   808 
       
   809     public static InetSocketAddress resolveAddress(InetSocketAddress address) {
       
   810         if (address != null && address.isUnresolved()) {
       
   811             // The default proxy selector may select a proxy whose  address is
       
   812             // unresolved. We must resolve the address before connecting to it.
       
   813             address = new InetSocketAddress(address.getHostString(), address.getPort());
       
   814         }
       
   815         return address;
       
   816     }
   808 }
   817 }