/** Parse cookie path attribute. */ public void parse(final Cookie cookie, final String path) throws MalformedCookieException { if (cookie == null) { throw new IllegalArgumentException("Cookie may not be null"); } if (path == null) { throw new MalformedCookieException("Missing value for path attribute"); } if (path.trim().equals("")) { throw new MalformedCookieException("Blank value for path attribute"); } cookie.setPath(path); cookie.setPathAttributeSpecified(true); }