public static boolean isCookieDomainValid(String cookieDomain){
  return StringUtils.isEmpty(cookieDomain) || !cookieDomain.contains(":");
}

public static boolean isCookieDomainValid ( String cookieDomain ) { return StringUtils . isEmpty ( cookieDomain ) || ! cookieDomain . contains ( ":" ) ; }
validates if cookie domain is syntactically correct .
