if (cookie == null) {
throw new IllegalArgumentException("Cookie may not be null");
}
if (value == null) {
throw new MalformedCookieException("Missing value for expires attribute");
}
try {
cookie.setExpiryDate(DateUtils.parseDate(value, this.datepatterns));
} catch (DateParseException dpe) {
throw new MalformedCookieException("Unable to parse expires attribute: "
+ value);
}