@Deprecated
  public static boolean verifyHostName(String hostname, String pattern) {
    String canonicalHostname;
    if (hostname.startsWith("[") && hostname.endsWith("]")) {
      // IPv6 address like [2001:db8:0:1:1:1:1:1]
      canonicalHostname = hostname.substring(1, hostname.length() - 1);
    } else {
      // This converts unicode domain name to ASCII
      try {
        canonicalHostname = IDN.toASCII(hostname);
      } catch (IllegalArgumentException e) {
        // e.g. hostname is invalid
        return false;
      }
    }
    return PGjdbcHostnameVerifier.INSTANCE.verifyHostName(canonicalHostname, pattern);
  }
@ Deprecated public static boolean verifyHostName ( String hostname , String pattern ) { String canonicalHostname ; if ( hostname . startsWith ( "[" ) && hostname . endsWith ( "]" ) ) { canonicalHostname = hostname . substring ( 1 , hostname . length ( ) - 1 ) ; } else { try { canonicalHostname = IDN . toASCII ( hostname ) ; } catch ( IllegalArgumentException e ) { return false ; } } return PGjdbcHostnameVerifier . INSTANCE . verifyHostName ( canonicalHostname , pattern ) ; }
Verifies if given hostname matches pattern.

@deprecated use {@link PGjdbcHostnameVerifier}
@param hostname input hostname
@param pattern domain name pattern
@return true when domain matches pattern