throw new IllegalArgumentException("Cookie may not be null");
if (paramCookieOrigin == null)
throw new IllegalArgumentException("Cookie origin may not be null");
String str1 = paramCookieOrigin.getHost().toLowerCase(Locale.ENGLISH);
if (paramCookie.getDomain() == null)
throw new CookieRestrictionViolationException("Invalid cookie state: domain not specified");
String str2 = paramCookie.getDomain().toLowerCase(Locale.ENGLISH);
if (((paramCookie instanceof ClientCookie)) && (((ClientCookie)paramCookie).containsAttribute("domain")))
{
if (!str2.startsWith("."))
throw new CookieRestrictionViolationException("Domain attribute \"" + paramCookie.getDomain() + "\" violates RFC 2109: domain must start with a dot");
int i = str2.indexOf('.', 1);
if (((i < 0) || (i == str2.length() - 1)) && (!str2.equals(".local")))
throw new CookieRestrictionViolationException("Domain attribute \"" + paramCookie.getDomain() + "\" violates RFC 2965: the value contains no embedded dots " + "and the value is not .local");
if (!domainMatch(str1, str2))
throw new CookieRestrictionViolationException("Domain attribute \"" + paramCookie.getDomain() + "\" violates RFC 2965: effective host name does not " + "domain-match domain attribute.");
String str3 = str1.substring(0, str1.length() - str2.length());
if (str3.indexOf('.') != -1)
throw new CookieRestrictionViolationException("Domain attribute \"" + paramCookie.getDomain() + "\" violates RFC 2965: " + "effective host minus domain may not contain any dots");
}
else if (!paramCookie.getDomain().equals(str1))
{
throw new CookieRestrictionViolationException("Illegal domain attribute: \"" + paramCookie.getDomain() + "\"." + "Domain of origin: \"" + str1 + "\"");
}
}