@Override public boolean domainMatch(final String host,String domain){
  if (host.equals(domain)) {
    return true;
  }
  if (!domain.startsWith(".")) {
    domain="." + domain;
  }
  return host.endsWith(domain) || host.equals(domain.substring(1));
}

@ Override public boolean domainMatch ( final String host , String domain ) { if ( host . equals ( domain ) ) { return true ; } if ( ! domain . startsWith ( "." ) ) { domain = "." + domain ; } return host . endsWith ( domain ) || host . equals ( domain . substring ( 1 ) ) ; }
performs domain - match as implemented in common browsers .
