equal
deleted
inserted
replaced
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 } |