@Test public void canonicalizeHosts() { assertEquals("::1", canonicalizeHost("::1")); assertEquals("::1", canonicalizeHost("[::1]")); assertEquals("127.0.0.1", canonicalizeHost("127.0.0.1")); assertEquals("some.long.url.com", canonicalizeHost("some.long.url.com")); assertEquals("[::1]", canonicalizeHost("[[::1]]")); }
@VisibleForTesting static String canonicalizeHost(String host) { if (host.startsWith("[") && host.endsWith("]")) { return host.substring(1, host.length() - 1); } return host; }
OkHttpTlsUpgrader { @VisibleForTesting static String canonicalizeHost(String host) { if (host.startsWith("[") && host.endsWith("]")) { return host.substring(1, host.length() - 1); } return host; } }
OkHttpTlsUpgrader { @VisibleForTesting static String canonicalizeHost(String host) { if (host.startsWith("[") && host.endsWith("]")) { return host.substring(1, host.length() - 1); } return host; }  }
OkHttpTlsUpgrader { @VisibleForTesting static String canonicalizeHost(String host) { if (host.startsWith("[") && host.endsWith("]")) { return host.substring(1, host.length() - 1); } return host; }  static SSLSocket upgrade(SSLSocketFactory sslSocketFactory,
      HostnameVerifier hostnameVerifier, Socket socket, String host, int port,
      ConnectionSpec spec); }
OkHttpTlsUpgrader { @VisibleForTesting static String canonicalizeHost(String host) { if (host.startsWith("[") && host.endsWith("]")) { return host.substring(1, host.length() - 1); } return host; }  static SSLSocket upgrade(SSLSocketFactory sslSocketFactory,
      HostnameVerifier hostnameVerifier, Socket socket, String host, int port,
      ConnectionSpec spec);  }